-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.35 KB
/
docs.yaml
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
name: Docs
on:
push:
branches: [main]
workflow_dispatch:
# Cancel previously running PR jobs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}-rust-ci:latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Build docs
run: cargo doc --no-deps
env:
# We are building a workspace and we want to provide online docs for all the packages.
# We rely on an experimental option for this:
# See: https://github.com/rust-lang/cargo/issues/8229
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options"
- name: Setup pages
id: pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: target/doc
deploy:
name: Deploy Docs
environment:
name: github-pages
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4