music on atproto
plyr.fm
1name: deploy staging
2
3on:
4 push:
5 branches:
6 - main
7 paths:
8 - "backend/src/**"
9 - "backend/pyproject.toml"
10 - "backend/uv.lock"
11 - "backend/Dockerfile"
12 - "backend/fly.staging.toml"
13 - "backend/alembic/**"
14 - "backend/alembic.ini"
15 - ".github/workflows/deploy-staging.yml"
16 workflow_dispatch:
17
18jobs:
19 deploy:
20 name: deploy staging
21 runs-on: ubuntu-latest
22 concurrency: deploy-backend-staging
23 steps:
24 - uses: actions/checkout@v4
25
26 - name: detect changes
27 uses: dorny/paths-filter@v3
28 id: changes
29 with:
30 filters: .github/path-filters.yml
31
32 - uses: superfly/flyctl-actions/setup-flyctl@master
33
34 - name: deploy to fly.io staging
35 run: |
36 if [ "${{ steps.changes.outputs.migrations }}" == "true" ]; then
37 echo "🔄 migrations detected - will run via release_command before deployment"
38 fi
39 flyctl deploy --config backend/fly.staging.toml --remote-only -a relay-api-staging .
40 env:
41 FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_STAGING }}