Skip to content

Commit 604f3b3

Browse files
authored
Create pages.yml
1 parent af778af commit 604f3b3

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/pages.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
name: Github Pages
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v2
16+
with:
17+
# github-pages-deploy-action requires we set this
18+
persist-credentials: false
19+
20+
- name: Restore the cached files
21+
uses: actions/cache@v2
22+
with:
23+
path: ~/.cargo/
24+
key: ${{ runner.os }}-pages-cargo
25+
26+
- name: Install Rust
27+
uses: actions-rs/toolchain@v1
28+
with:
29+
toolchain: nightly
30+
profile: minimal
31+
default: true
32+
33+
- name: Install/Update cargo utils
34+
run: cargo install mdbook
35+
36+
- name: Build The Book
37+
run: mdbook build
38+
39+
- name: Deploy to GitHub Pages
40+
uses: JamesIves/github-pages-deploy-action@3.7.1
41+
with:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
BRANCH: gh-pages
44+
FOLDER: target/book_out
45+
CLEAN: true

0 commit comments

Comments
 (0)