From 6e94ba73e2beb079729b7676a808101e78df86f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Quintana=20Garc=C3=ADa?= <145330494+marco-qg@users.noreply.github.com> Date: Wed, 1 May 2024 23:45:04 +0200 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5dfa6d41..fd0976fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -263,20 +263,16 @@ jobs: deploy: name: Deploy over SSH runs-on: ubuntu-latest - permissions: - contents: read - packages: write - needs: [e2e-tests] + needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp, docker-push-questiongeneratorservice, docker-push-storequestionservice, docker-push-userstatsservice, docker-push-wikidataextractorservice, docker-push-gameservice, docker-push-apisgatewayservice] steps: - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - uses: actions/checkout@v4 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v5 + - name: Deploy over SSH + uses: fifsky/ssh-action@master with: - name: arquisoft/wiq_es6c/apisgatewayservice - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ghcr.io - workdir: apisgatewayservice - platforms: linux/arm64 \ No newline at end of file + host: ${{ secrets.DEPLOY_HOST }} + user: ${{ secrets.DEPLOY_USER }} + key: ${{ secrets.DEPLOY_KEY }} + command: | + wget https://raw.githubusercontent.com/arquisoft/wiq_es6c/master/docker-compose.yml -O docker-compose.yml + wget https://raw.githubusercontent.com/arquisoft/wiq_es6c/master/.env -O .env + docker compose --profile prod down + docker compose --profile prod up -d --pull always