Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Deploy
run-name: "Deploy ${{ github.ref_name }} to FastAPI Cloud"

# Deploys to FastAPI Cloud with a deploy token once CI has passed on main.
# Deploys to FastAPI Cloud with a deploy token when a GitHub release is published.
# Needs repo secrets FASTAPI_CLOUD_TOKEN (deploy token) and FASTAPI_CLOUD_APP_ID.
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
release:
types: [published]
workflow_dispatch:

permissions: {}
Expand All @@ -18,14 +17,12 @@ concurrency:
jobs:
deploy:
name: deploy
if: github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push')
if: github.event_name == 'workflow_dispatch' || !github.event.release.prerelease
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
- uses: actions/setup-python@v6
with:
python-version: "3.11"
Expand Down
Loading