-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1005 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Publish Main
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
book_publish:
name: Publish Book to github Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-mdbook-0.4
- run: cargo install mdbook --no-default-features --features search --vers "^0.4" --locked || echo "already installed"
- name: build book
run: mdbook build
working-directory: book
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'book/book'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4