Skip to content

Commit

Permalink
Set the target deployment to main during dispatched documentation d…
Browse files Browse the repository at this point in the history
…eployments (#7304)

Closes #7276 by deploying to production when not triggered by a pull
request.
  • Loading branch information
zanieb authored Sep 12, 2023
1 parent e561f57 commit 5d4dd3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ jobs:
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy site --project-name=ruff-docs --branch ${GITHUB_HEAD_REF} --commit-hash ${GITHUB_SHA}
# `github.head_ref` is only set during pull requests and for manual runs or tags we use `main` to deploy to production
command: pages deploy site --project-name=ruff-docs --branch ${{ github.head_ref || 'main' }} --commit-hash ${GITHUB_SHA}

0 comments on commit 5d4dd3e

Please sign in to comment.