Skip to content

Fly Deploy

Fly Deploy #186

Workflow file for this run

name: Fly Deploy
# Wait until the CI tests complete
on:
workflow_run:
workflows: ["Django CI"]
branches: [main]
types:
- completed
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
FMP_API_KEY: ${{ secrets.FMP_API_KEY }}
jobs:
deploy:
name: Deploy App
runs-on: ubuntu-latest
# Deploy to Fly.io if the CI workflow was successful
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Set Environment
run: echo "SECRET_KEY=$(openssl rand -base64 32)" >> $GITHUB_ENV
- name: Deploy to Fly.io
run: flyctl deploy --remote-only
timeout-minutes: 10 # default: 6 hours