File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy knowledge_books
2+
3+ on :
4+ push :
5+ branches :
6+ - main # 或者你使用的其他主分支名
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Install mdBook
17+ run : |
18+ curl -sSL https://github.com/rust-lang/mdBook/releases/latest/download/mdbook-v0.4.36-x86_64-unknown-linux-gnu.tar.gz | tar -xz
19+ sudo mv mdbook /usr/local/bin
20+
21+ - name : Build the book
22+ working-directory : book_template
23+ run : mdbook build
24+
25+ - name : Deploy to GitHub Pages
26+ uses : peaceiris/actions-gh-pages@v4
27+ with :
28+ github_token : ${{ secrets.GITHUB_TOKEN }}
29+ publish_dir : publish_books/book_template
30+ publish_branch : gh-pages # 你想部署的分支
31+ cname : " yinghuochong" # 如果你使用自定义域名,可以填写
You can’t perform that action at this time.
0 commit comments