Skip to content

Commit

Permalink
Merge pull request #44 from software-students-spring2024/redeploy-wor…
Browse files Browse the repository at this point in the history
…kflow

implement redeploy workflow
  • Loading branch information
ayd2134 authored Apr 30, 2024
2 parents 4c99493 + 1557713 commit 929e9bd
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/redeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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"

0 comments on commit 929e9bd

Please sign in to comment.