Skip to content

Commit 74f5a32

Browse files
committed
add GitHub workflow for book deployment
1 parent 6af40e5 commit 74f5a32

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-24.04
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup mdBook
18+
uses: peaceiris/actions-mdbook@v2
19+
with:
20+
mdbook-version: '0.4.40'
21+
22+
- run: mdbook build
23+
24+
- name: Deploy
25+
uses: peaceiris/actions-gh-pages@v3
26+
if: ${{ github.ref == 'refs/heads/main' }}
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: ./book

0 commit comments

Comments
 (0)