Skip to content

Redeploy on Droplet

Redeploy on Droplet #6

Workflow file for this run

name: Redeploy on Droplet
on:
workflow_run:
workflows: ["Build and Push Docker Images"]
types:
- completed
jobs:
trigger:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Restart Docker Compose
run: |
ssh -o "StrictHostKeyChecking=no" [email protected] "cd ~/5-final-project-spring-2024-ics5 && docker compose down && docker compose pull && docker compose up -d"