Skip to content

Commit a5158b4

Browse files
committed
.github: Fix CI
1 parent aa0fe95 commit a5158b4

File tree

1 file changed

+38
-25
lines changed

1 file changed

+38
-25
lines changed

.github/workflows/gh-pages.yml

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,44 @@
1-
name: github pages
1+
name: Deploy mdBook site to Pages
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
workflow_dispatch:
4+
push:
5+
branches: [main]
6+
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
7+
pull_request:
98

10-
jobs:
11-
deploy:
12-
runs-on: ubuntu-20.04
13-
concurrency:
14-
group: ${{ github.workflow }}-${{ github.ref }}
15-
steps:
16-
- uses: actions/checkout@v2
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
1714

18-
- name: Setup mdBook
19-
uses: peaceiris/actions-mdbook@v1
20-
with:
21-
mdbook-version: "0.4.37"
22-
# mdbook-version: 'latest'
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: false
2320

24-
- run: mdbook build
21+
jobs:
22+
build:
23+
runs-on: ubuntu-24.04
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: peaceiris/actions-mdbook@v2
27+
with:
28+
mdbook-version: latest
29+
- id: pages
30+
uses: actions/configure-pages@v5
31+
- run: mdbook build
32+
- uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: ./book
2535

26-
- name: Deploy
27-
uses: peaceiris/actions-gh-pages@v3
28-
if: ${{ github.ref == 'refs/heads/master' }}
29-
with:
30-
github_token: ${{ secrets.GITHUB_TOKEN }}
31-
publish_dir: ./book
36+
deploy:
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
runs-on: ubuntu-24.04
41+
needs: build
42+
steps:
43+
- id: deployment
44+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)