Skip to content

Commit

Permalink
feat: update cd script to applying changed dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
geoje committed Dec 3, 2024
1 parent 43f3fb1 commit fce3314
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/be-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ jobs:
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd ~/${{ github.event.repository.name }}
docker compose stop be
docker compose rm -f be
docker compose up -d be
cd ~/${{ github.event.repository.name }}/server
docker compose -f docker-compose-db.yaml pull
docker compose -f docker-compose-be.yaml pull
docker compose -f docker-compose-be.yaml down
docker compose -f docker-compose-be.yaml up -d
docker compose -f docker-compose-db.yaml up -d
8 changes: 4 additions & 4 deletions .github/workflows/fe-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ jobs:
source: frontend/dist/, server/
target: ~/${{ github.event.repository.name }}

- name: Reload docker compose
- name: Restart docker compose
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd ~/${{ github.event.repository.name }}/server
docker compose stop fe
docker compose rm -f fe
docker compose up -d fe
docker compose -f docker-compose-fe.yaml pull
docker compose -f docker-compose-fe.yaml down
docker compose -f docker-compose-fe.yaml up -d

0 comments on commit fce3314

Please sign in to comment.