Skip to content

Commit

Permalink
chore: restart nginx after front-end code deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Oct 2, 2024
1 parent 7c1277d commit 33f677f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,18 @@ jobs:
target: "/home/${{ env.SSH_USERNAME }}/${{ matrix.env }}/www"
rm: true
strip_components: 1

# We need to restart nginx to prevent permission issues after deploying
# front-end code directly by untarring it in the www directory.
# This is a workaround, we should use a better solution in the long-term
- name: Restart nginx
uses: appleboy/ssh-action@master
with:
host: ${{ env.SSH_HOST }}
username: ${{ env.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
proxy_host: ${{ env.SSH_PROXY_HOST }}
proxy_username: ${{ env.SSH_USERNAME }}
proxy_key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd ${{ matrix.env }} && docker compose restart nginx

0 comments on commit 33f677f

Please sign in to comment.