Merge pull request #49 from TUK-SPORTIFY/feat/#8-member #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sportify Backend CD | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ssh access | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{secrets.GCP_HOST}} | |
username: ${{secrets.GCP_USERNAME}} | |
key: ${{secrets.GCP_SSH_KEY}} | |
script: | | |
cd sportify-backend | |
git pull | |
sudo docker-compose down | |
sudo docker rmi $(sudo docker images -f "dangling=true" -q) | |
sudo docker-compose up -d --build |