-
Notifications
You must be signed in to change notification settings - Fork 16
52 lines (42 loc) · 1.16 KB
/
github_pages.yml
File metadata and controls
52 lines (42 loc) · 1.16 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
# Licensed under the Apache-2.0 license
name: GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
env:
CARGO_TERM_COLOR: always
jobs:
build-and-deploy:
name: Build and Deploy to GitHub Pages
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
disk-cache: true
repository-cache: true
- name: Build mdbook documentation
id: build-docs
run: |
bazel build //docs
echo "path=$(bazel cquery --output=files --platform_suffix= --@@pigweed+//pw_kernel:enable_tests=false //docs 2>/dev/null)" >> "$GITHUB_OUTPUT"
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: ${{ steps.build-docs.outputs.path }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5