mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-01-22 23:10:20 +08:00
build: github-page
This commit is contained in:
parent
d30813ae08
commit
08d1cf86cd
31
.github/workflows/page.yml
vendored
Normal file
31
.github/workflows/page.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: page CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
name: Build and Deploy
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
|
||||
- name: Build the Rust book
|
||||
run: |
|
||||
cargo install mdbook
|
||||
mdbook build
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./book
|
Loading…
Reference in New Issue
Block a user