remove old container on deploy

This commit is contained in:
Quentin Roussel
2024-08-18 20:18:32 +08:00
parent 591e0f2baa
commit b9a6b4e3f0

View File

@@ -33,5 +33,8 @@ jobs:
- name: Upload files - name: Upload files
run: rsync -rvp --chown=quentin:users --chmod=777 --exclude=.gitea --exclude=.git ${{ vars.RSYNC_ARGS }} . remote:${{ vars.DESTINATION_DIR }} run: rsync -rvp --chown=quentin:users --chmod=777 --exclude=.gitea --exclude=.git ${{ vars.RSYNC_ARGS }} . remote:${{ vars.DESTINATION_DIR }}
- name: Remove old container
run: docker kill $(docker ps -aq --filter ancestor=sg_rain_radar) && docker rm $(docker ps -aq --filter ancestor=sg_rain_radar)
- name: Run container - name: Run container
run: ssh remote 'cd ${{ vars.DESTINATION_DIR }} && make run' run: ssh remote 'cd ${{ vars.DESTINATION_DIR }} && make run'