From 7e82bd2247e43ee4338fafcc93db3dc020af3b99 Mon Sep 17 00:00:00 2001 From: david alvarez <99325990+bidof@users.noreply.github.com> Date: Sat, 24 Feb 2024 01:46:08 +0100 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8bece02..9ddf038 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,10 @@ name: Deploy on release on: - release: - types: [published] + push: + branches: + -master + -releases jobs: unit-tests: @@ -51,7 +53,9 @@ jobs: - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: - API_URI: http://${{ secrets.DEPLOY_HOST }}:8000 + API_URI: http://${{ secrets.DEPLOY_HOST || 'localhost' }}:8000 + + with: name: arquisoft/wiq_es04c/webapp username: ${{ github.actor }} @@ -109,7 +113,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - workdir: gatewayservice + workdir: ./gatewayservice docker-push-questionservice: name: Push question service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -126,7 +130,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - workdir: questionservice + workdir: ./questionservice deploy: name: Deploy over SSH @@ -140,7 +144,8 @@ jobs: user: ${{ secrets.DEPLOY_USER }} key: ${{ secrets.DEPLOY_KEY }} command: | - wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/master/docker-compose.yml -O docker-compose.yml - wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/master/.env -O .env + wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/releases/docker-compose.yml -O docker-compose.yml + wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/releases/.env -O .env + git clone -b releases https://github.com/Arquisoft/wiq_es04c.git docker compose --profile prod down docker compose --profile prod up -d