Skip to content

Commit 7c6bd48

Browse files
committed
workflows: Split and modernize doc build/deployment
Split the job, update to latest action versions.
1 parent 8a593a5 commit 7c6bd48

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

.github/workflows/pages.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,16 @@ on:
77
# Allow running this workflow manually from the Actions tab
88
workflow_dispatch:
99

10-
permissions:
11-
contents: read
12-
pages: write
13-
id-token: write
14-
1510
# Allow only one concurrent deployment
1611
concurrency:
1712
group: "pages"
1813
cancel-in-progress: false
1914

2015
jobs:
21-
deploy:
22-
runs-on: ubuntu-22.04
23-
environment:
24-
name: github-pages
25-
url: ${{ steps.deployment.outputs.page_url }}
16+
build:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
2620

2721
steps:
2822
- uses: actions/checkout@v4
@@ -39,14 +33,24 @@ jobs:
3933
- name: Move output to target directory
4034
run: mv doc/html public_html/
4135

42-
- name: Setup Pages
43-
uses: actions/configure-pages@v3
44-
4536
- name: Upload pages artifact
46-
uses: actions/upload-pages-artifact@v1
37+
id: deployment
38+
uses: actions/upload-pages-artifact@v3
4739
with:
4840
path: public_html/
4941

42+
deploy:
43+
needs: build
44+
runs-on: ubuntu-latest
45+
permissions:
46+
contents: read
47+
pages: write
48+
id-token: write
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
53+
steps:
5054
- name: Deploy to GitHub Pages
5155
id: deployment
52-
uses: actions/deploy-pages@v2
56+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)