Skip to content

Commit 6e856b4

Browse files
committed
feat: deploy PR preview to gh pages
1 parent 0b2c140 commit 6e856b4

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: build
22

3+
concurrency: preview-${{ github.ref }}
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
39
on:
410
pull_request:
511

@@ -19,5 +25,14 @@ jobs:
1925
- name: Install uv
2026
uses: astral-sh/setup-uv@v6
2127

22-
- name: Validate
28+
- name: Build HTML Docs
2329
run: VERSION=${{ github.event.repository.default_branch }} JOBS=4 MODE=html make all
30+
31+
- name: Deploy PR Doc Preview
32+
uses: rossjrw/pr-preview-action@v1
33+
with:
34+
source-dir: ../cpython/Doc/build/html
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
preview-branch: gh-pages
37+
umbrella-dir: pr-preview
38+
action: auto

.github/workflows/deploy-gh-page.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ jobs:
2323
- name: Deploy to gh page
2424
uses: JamesIves/[email protected]
2525
with:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27-
BRANCH: gh-pages
28-
FOLDER: ../cpython/Doc/build/html
29-
CLEAN: true
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
branch: gh-pages
28+
folder: ../cpython/Doc/build/html
29+
clean: true
30+
clean-exclude: pr-preview/

0 commit comments

Comments
 (0)