Add a github pages auto-build action.
commita3a9502596631cfc33b5339610175ea1a07adf53
authorBlaž Hrastnik <blaz@mxxn.io>
dateSun 30 May 2021, 17:12 (5 years ago)
parent3810650
.github/workflows/gh-pages.ymlnew file+27
@@ -0,0 +1,27 @@
1+name: Github Pages
2+
3+on:
4+ push:
5+ branches:
6+ - master
7+
8+jobs:
9+ deploy:
10+ runs-on: ubuntu-latest
11+ steps:
12+ - uses: actions/checkout@v2
13+
14+ - name: Setup mdBook
15+ uses: peaceiris/actions-mdbook@v1
16+ with:
17+ mdbook-version: 'latest'
18+ # mdbook-version: '0.4.8'
19+
20+ - run: mdbook build book
21+
22+ - name: Deploy
23+ uses: peaceiris/actions-gh-pages@v3
24+ if: github.ref == 'refs/heads/master'
25+ with:
26+ github_token: ${{ secrets.GITHUB_TOKEN }}
27+ publish_dir: ./book/book