File tree Expand file tree Collapse file tree 2 files changed +23
-12
lines changed
Expand file tree Collapse file tree 2 files changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,28 @@ name: Docs
33on :
44 pull_request :
55 branches : [main]
6+ workflow_dispatch : # Manual trigger
7+ workflow_run :
8+ workflows : ["Release"]
9+ types : [completed]
10+
11+ permissions :
12+ contents : write
613
714jobs :
815 docs :
916 runs-on : ubuntu-latest
17+ # Run on PR, manual trigger, or successful Release
18+ if : |
19+ github.event_name == 'pull_request' ||
20+ github.event_name == 'workflow_dispatch' ||
21+ (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
1022
1123 steps :
1224 - uses : actions/checkout@v6
25+ with :
26+ # For workflow_run, checkout the commit that triggered Release
27+ ref : ${{ github.event.workflow_run.head_sha || github.ref }}
1328
1429 - name : Install uv
1530 uses : astral-sh/setup-uv@v7
1934
2035 - name : Build docs
2136 run : uv run mkdocs build
37+
38+ - name : Deploy to GitHub Pages
39+ # Deploy on manual trigger or after successful Release
40+ if : github.event_name != 'pull_request'
41+ uses : peaceiris/actions-gh-pages@v4
42+ with :
43+ github_token : ${{ secrets.GITHUB_TOKEN }}
44+ publish_dir : ./site
Original file line number Diff line number Diff line change 2929 with :
3030 generate_release_notes : true
3131 files : dist/*
32-
33- - name : Install docs dependencies
34- run : uv sync --extra docs
35-
36- - name : Build docs
37- run : uv run mkdocs build
38-
39- - name : Deploy to GitHub Pages
40- uses : peaceiris/actions-gh-pages@v4
41- with :
42- github_token : ${{ secrets.GITHUB_TOKEN }}
43- publish_dir : ./site
You can’t perform that action at this time.
0 commit comments