Skip to content

TWTW Backend CD

TWTW Backend CD #123

Workflow file for this run

name: TWTW Backend CD
on:
workflow_run:
branches:
- "master"
workflows: ["TWTW Backend CI", "TWTW Nginx Build"]
types:
- completed
jobs:
server-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
# - name: Copy docker-compose file to server
# uses: appleboy/scp-action@master
# with:
# host: ${{ secrets.AWS_IP }}
# username: ubuntu
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# source: "./docker-compose.prod.yml"
# target: "/var/www/TWTW"
# - name: Deploy using docker-compose
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.AWS_IP }}
# username: ubuntu
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# script: |
# cd /var/www/TWTW
# sudo docker-compose down
# sudo docker-compose pull
# sudo docker-compose up -d