-
-
Notifications
You must be signed in to change notification settings - Fork 369
56 lines (51 loc) · 1.57 KB
/
Copy pathpages.yml
File metadata and controls
56 lines (51 loc) · 1.57 KB
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
name: docs site
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
# Single source of truth for the mdBook version: check-docs-site.sh
# tells contributors to install the version pinned here. Never
# install unpinned.
MDBOOK_VERSION: 0.5.4
permissions:
contents: read
jobs:
build:
name: Build Documentation Site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install mdBook
run: cargo install mdbook --version ${{ env.MDBOOK_VERSION }} --locked
- name: Build and link check
run: ./scripts/check-docs-site.sh
- name: Post-process for search and AI-assistant discovery
run: ./scripts/postprocess-docs-site.sh
- name: Upload site
uses: actions/upload-pages-artifact@v5
with:
path: site/book
# mdBook emits site/book/.nojekyll, and v4 started dropping
# hidden files from the artifact by default.
include-hidden-files: true
deploy:
name: Deploy Documentation Site
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
# Publishes the artifact built above and checks nothing out, so it
# needs no contents scope of its own.
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5