fix deploy workflow - use direct ssh
Some checks failed
Deploy Gateway / deploy (push) Failing after 2m12s
Some checks failed
Deploy Gateway / deploy (push) Failing after 2m12s
This commit is contained in:
parent
6fd9ce736d
commit
e8d3fd72a7
1 changed files with 13 additions and 13 deletions
|
|
@ -9,18 +9,18 @@ jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Deploy to Infomaniak VM
|
- name: Deploy to Infomaniak VM
|
||||||
uses: appleboy/ssh-action@v1.0.3
|
env:
|
||||||
with:
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
host: api.poweron.swiss
|
run: |
|
||||||
username: ubuntu
|
mkdir -p ~/.ssh
|
||||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/deploy_key
|
||||||
script: |
|
chmod 600 ~/.ssh/deploy_key
|
||||||
cd /srv/gateway/current
|
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no ubuntu@api.poweron.swiss "
|
||||||
git pull
|
cd /srv/gateway/current &&
|
||||||
source .venv/bin/activate
|
git pull &&
|
||||||
pip install -r requirements.txt --no-cache-dir
|
source .venv/bin/activate &&
|
||||||
|
pip install -r requirements.txt --no-cache-dir &&
|
||||||
sudo systemctl restart gateway
|
sudo systemctl restart gateway
|
||||||
|
"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue