Skip to content

TWTW Backend CD

TWTW Backend CD #48

Workflow file for this run

name: TWTW Backend CD
on:
workflow_run:
workflows: ["TWTW Backend CI"]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Google Cloud SDK
uses: google-github-actions/[email protected]
with:
version: '455.0.0'
project_id: ${{ secrets.GCP_PROJECT }}
service_account_key: ${{ secrets.GCP_KEY }}
export_default_credentials: true
- name: Deploy to GCE with Docker Compose
run: |
gcloud compute ssh twtw-server --zone=${{ secrets.GCP_ZONE }} --command="cd ~/TWTW && sudo git pull && sudo docker-compose down && sudo docker-compose up --build -d"