Skip to content

Commit d2277ed

Browse files
committed
Set up GitHub Pages auto-deploy
1 parent 0d54d6b commit d2277ed

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy mdBook to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Install mdBook
17+
run: cargo install mdbook --locked
18+
19+
- name: Build the book
20+
run: mdbook build
21+
22+
- name: Add .nojekyll
23+
run: touch book/.nojekyll
24+
25+
- name: Deploy to GitHub Pages 🚀
26+
uses: peaceiris/actions-gh-pages@v3
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: ./book
30+
publish_branch: gh-pages

0 commit comments

Comments
 (0)