-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (56 loc) · 1.57 KB
/
Copy pathdocs.yaml
File metadata and controls
61 lines (56 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
57
58
59
60
61
name: Docs
# Build the Material for MkDocs site and publish to GitHub Pages.
# Fully decoupled from ci.yaml — no Go, CGO, or bifrost checkout needed.
on:
push:
branches: [main]
paths:
- docs/**
- overrides/**
- examples/**
- mkdocs.yml
- requirements-docs.txt
- .github/workflows/docs.yaml
pull_request:
paths:
- docs/**
- overrides/**
- examples/**
- mkdocs.yml
- requirements-docs.txt
- .github/workflows/docs.yaml
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install -r requirements-docs.txt
- run: mkdocs build --strict
- uses: actions/upload-pages-artifact@v3
with:
path: site
# Deploy only from main; PRs just build (above) to catch --strict failures.
deploy:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# Switch the Pages source to "GitHub Actions" (build_type=workflow). Without
# this, deploy-pages fails with "HttpError: Not Found" when the repo's Pages
# is set to legacy "Deploy from a branch" mode.
- uses: actions/configure-pages@v5
with:
enablement: true
- id: deployment
uses: actions/deploy-pages@v4