Repository navigation
90 lines (77 loc) · 2.2 KB
/
Copy pathdocs.yml
File metadata and controls
90 lines (77 loc) · 2.2 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Deploy Docs
on:
push:
branches:
- master
- develop
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
pull_request:
branches:
- master
- develop
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions: {}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit
- uses: actions/checkout@v7
with:
persist-credentials: false
# markdownlint runs through `pnpm dlx`: npm refuses to run inside this
# repo, since `devEngines.packageManager` names pnpm (EBADDEVENGINES).
- name: Setup pnpm and Node
uses: ./.github/actions/setup-pnpm-node
- uses: actions/setup-python@v7
with:
python-version: '3.x'
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Install docs dependencies
run: pip install -r docs/requirements.txt
- name: Lint docs
run: |
codespell docs/docs/
pnpm dlx markdownlint-cli@0.49.1 --config docs/.markdownlint.json docs/docs/
- name: Build docs
run: zensical build --clean --strict
working-directory: docs
- uses: actions/upload-pages-artifact@v5
if: ${{ github.event_name != 'pull_request' }}
with:
path: docs/site
deploy:
needs: build
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pages: write
id-token: write
contents: read
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit
- id: deployment
uses: actions/deploy-pages@v5