Skip to content

Deploy

Deploy #187

Workflow file for this run

name: Deploy
on:
workflow_run:
workflows: ["CI"]
types: [completed]
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
deploy-infra:
name: Deploy ${{ matrix.app }}
runs-on: ubuntu-latest
timeout-minutes: 30
if: >-
${{
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
}}
concurrency:
group: fly-${{ matrix.app }}
cancel-in-progress: true
permissions:
contents: read
environment:
name: production
strategy:
fail-fast: false
matrix:
include:
- app: relay
config: fly.relay.toml
workdir: "."
token_secret: FLY_API_TOKEN_RELAY
- app: blossom
config: fly.blossom.toml
workdir: "."
token_secret: FLY_API_TOKEN_BLOSSOM
- app: tlsn-verifier
config: fly.toml
workdir: crates/tlsn-server
token_secret: FLY_API_TOKEN_VERIFIER
steps:
- name: Harden runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Flyctl
uses: superfly/flyctl-actions/setup-flyctl@ed8efb33836e8b2096c7fd3ba1c8afe303ebbff1 # master
- name: Deploy ${{ matrix.app }}
working-directory: ${{ matrix.workdir }}
run: flyctl deploy --remote-only --config ${{ matrix.config }}
env:
FLY_API_TOKEN: ${{ secrets[matrix.token_secret] }}
deploy-app:
name: Deploy Anchr App
needs: deploy-infra
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: fly-app
cancel-in-progress: true
permissions:
contents: read
environment:
name: production
steps:
- name: Harden runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Flyctl
uses: superfly/flyctl-actions/setup-flyctl@ed8efb33836e8b2096c7fd3ba1c8afe303ebbff1 # master
- name: Deploy
run: flyctl deploy --remote-only --config fly.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_APP }}
deploy-worker:
name: Deploy Auto-Worker
needs: deploy-app
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: fly-worker
cancel-in-progress: true
permissions:
contents: read
environment:
name: production
steps:
- name: Harden runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Flyctl
uses: superfly/flyctl-actions/setup-flyctl@ed8efb33836e8b2096c7fd3ba1c8afe303ebbff1 # master
- name: Deploy
run: flyctl deploy --remote-only --config fly.worker.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_WORKER }}
# deploy-market lives in its own workflow now — see
# .github/workflows/deploy-market.yml. The example apps deploy on their
# own cadence so a market UI tweak doesn't trigger an infra rollout
# (and vice versa). Future examples follow the same pattern:
# deploy-<example>.yml with path filtering.