TWTW Backend CD #125
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: 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 |