Skip to content

Commit 93aa461

Browse files
committed
Fix GitHub Pages deployment failing on release tags
The github-pages environment protection rules only allow deployment from the main branch. When a release is published, the workflow runs in the tag ref context (e.g. refs/tags/v0.2.0), which the environment rejects. Fix by: - Adding push trigger on main so deploys run in a branch context - Pinning checkout to ref: main so release-triggered builds also use the branch (not the detached tag) https://claude.ai/code/session_01MVwVedn97waTs89PBTnhzb
1 parent 21045f0 commit 93aa461

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Deploy Docs to GitHub Pages
22

33
on:
4+
push:
5+
branches: [main]
46
release:
57
types: [published]
68
workflow_dispatch:
@@ -23,6 +25,8 @@ jobs:
2325
runs-on: ubuntu-latest
2426
steps:
2527
- uses: actions/checkout@v4
28+
with:
29+
ref: main
2630

2731
- name: Set up Python
2832
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)