Deploy #7
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: Deploy | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Runs when CI passes | |
workflow_run: | |
workflows: [CI] | |
branches: [main] | |
types: [completed] | |
# Allow one concurrent deployment | |
concurrency: | |
group: pages | |
cancel-in-progress: true | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
jobs: | |
deploy: | |
name: Deploy to Fly.io | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up flyctl | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Deploy to Fly.io | |
run: flyctl deploy --remote-only | |
- name: Notify Bugsnag | |
uses: psprings/[email protected] | |
with: | |
apiKey: ${{ secrets.BUGSNAG_API_KEY }} | |
appVersion: ${{ github.sha }} | |
releaseStage: production |