Skip to content

Commit

Permalink
Merge pull request #384 from scidsg/deploy-on-release
Browse files Browse the repository at this point in the history
Deploy to DigitalOcean after a release has been built
  • Loading branch information
micahflee committed Jul 2, 2024
2 parents f36bf7a + 8d73051 commit 4880c4e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build release container image
on:
push:
tags:
- 'v*'
- "v*"

jobs:
build-and-push:
Expand All @@ -28,3 +28,24 @@ jobs:
tags: |
ghcr.io/${{ github.repository }}/hushline:${{ github.ref_name }}
ghcr.io/${{ github.repository }}/hushline:release
deploy:
runs-on: ubuntu-latest
needs: build-and-push
steps:
- name: Install doctl and authenticate
run: |
sudo snap install doctl
doctl auth init -t $DIGITALOCEAN_TOKEN
- name: Trigger deployment on DigitalOcean App Platform
run: |
doctl apps create-deployment $DIGITALOCEAN_APP_ID --force-rebuild
env:
DIGITALOCEAN_APP_ID: ${{ secrets.DIGITALOCEAN_APP_ID }}

- name: Wait for deployment to finish
run: |
doctl apps wait $DIGITALOCEAN_APP_ID
env:
DIGITALOCEAN_APP_ID: ${{ secrets.DIGITALOCEAN_APP_ID }}
File renamed without changes.
File renamed without changes.

0 comments on commit 4880c4e

Please sign in to comment.