Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bidof authored Feb 24, 2024
1 parent d30cee3 commit 7e82bd2
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Deploy on release

on:
release:
types: [published]
push:
branches:
-master
-releases

jobs:
unit-tests:
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -126,7 +130,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: questionservice
workdir: ./questionservice

deploy:
name: Deploy over SSH
Expand All @@ -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

0 comments on commit 7e82bd2

Please sign in to comment.