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:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Deploy to Infomaniak VM
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: api.poweron.swiss
|
||||
username: ubuntu
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
script: |
|
||||
cd /srv/gateway/current
|
||||
git pull
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt --no-cache-dir
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/deploy_key
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no ubuntu@api.poweron.swiss "
|
||||
cd /srv/gateway/current &&
|
||||
git pull &&
|
||||
source .venv/bin/activate &&
|
||||
pip install -r requirements.txt --no-cache-dir &&
|
||||
sudo systemctl restart gateway
|
||||
"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue