Skip to content

Commit 9c85f76

Browse files
committed
Add GitHub workflow to build mdBook pages.
1 parent e230ed4 commit 9c85f76

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/gh-pages.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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-20.04
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup mdBook
17+
uses: peaceiris/actions-mdbook@v1
18+
with:
19+
mdbook-version: '0.4.10'
20+
# mdbook-version: 'latest'
21+
- run: mdbook build
22+
- name: Deploy
23+
uses: peaceiris/actions-gh-pages@v3
24+
if: ${{ github.ref == 'refs/heads/main' }}
25+
with:
26+
github_token: ${{ secrets.GITHUB_TOKEN }}
27+
publish_dir: ./book
28+
publish_branch: gh-pages

0 commit comments

Comments
 (0)