From e8d3fd72a762e3ca9dfd3e559f4115992f162c70 Mon Sep 17 00:00:00 2001 From: Ida Date: Mon, 20 Apr 2026 19:49:27 +0200 Subject: [PATCH] fix deploy workflow - use direct ssh --- .forgejo/workflows/deploy.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 9cce863f..0f34f30d 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -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 + " +