Merge pull request #765 from bounswe/be/add_not_voted_by_me_for_nonauth #104
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: Deploy-Backend-to-Compute-Engine | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "app/backend/**" | |
- ".github/workflows/backend-deploy.yml" | |
jobs: | |
deploy: | |
name: Deploy to Compute Engine | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the files | |
uses: actions/checkout@v2 | |
- name: Deploy to server | |
uses: easingthemes/ssh-deploy@main | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }} | |
REMOTE_HOST: 34.105.66.254 | |
REMOTE_USER: alp.tuna.453 | |
SOURCE: app/backend/ | |
TARGET: ~/backend | |
ARGS: --delete | |
EXCLUDE: .env | |
SCRIPT_AFTER: | | |
cd ~/backend | |
docker stop app | |
docker rm app | |
docker rmi pollup:backend | |
docker build -t pollup:backend . | |
docker run --name app -p 1923:3000 -d pollup:backend | |
docker system prune |