-
Notifications
You must be signed in to change notification settings - Fork 22
58 lines (53 loc) · 1.7 KB
/
mdbook.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.28 # MDBOOK_ADMONISH is depends on this exact build.
MDBOOK_ADMONISH_VERSION: 1.9.0
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install mdBook
run: |
mkdir ~/tools
curl -L https://github.com/rust-lang/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/tools
curl -L https://github.com/tommilligan/mdbook-admonish/releases/download/v$MDBOOK_ADMONISH_VERSION/mdbook-admonish-v$MDBOOK_ADMONISH_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/tools
echo ~/tools >> $GITHUB_PATH
- name: Install static-sitemap-cli
run: npm install static-sitemap-cli
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with mdBook
run: mdbook build -d book docs
- name: Generate sitemap
run: |
cd docs/book
npx sscli --no-clean --base https://lucascheller.github.io/VFX-UsdAssetResolver
cd ../..
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/book
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
id-token: write
pages: write
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2