Skip to content

Update project with steps to deploy to fly.io #30

Update project with steps to deploy to fly.io

Update project with steps to deploy to fly.io #30

Workflow file for this run

# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
name: Fly Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
# If using storage volume, i.e. to persist SQLite database, then uncomment to activate the following job:
# migrate:
# name: Run migrations if using storage volume
# runs-on: ubuntu-latest
# needs: deploy
# steps:
# - uses: actions/checkout@v4
# - uses: superfly/flyctl-actions/setup-flyctl@master
# - run: flyctl ssh console -C 'python manage.py migrate'
# env:
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}