File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy
2+ on :
3+ push :
4+ branches :
5+ - master
6+
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v3
12+ with :
13+ fetch-depth : 0
14+ - name : Install mdbook
15+ run : |
16+ mkdir mdbook
17+ curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
18+ echo `pwd`/mdbook >> $GITHUB_PATH
19+ - name : Deploy GitHub Pages
20+ run : |
21+ mdbook build
22+ git worktree add gh-pages
23+ git config user.name "Deploy from CI"
24+ git config user.email ""
25+ cd gh-pages
26+ # Delete the ref to avoid keeping history.
27+ git update-ref -d refs/heads/gh-pages
28+ rm -rf *
29+ mv ../book/* .
30+ git add .
31+ git commit -m "Deploy $GITHUB_SHA to gh-pages"
32+ git push --force --set-upstream origin gh-pages
You can’t perform that action at this time.
0 commit comments