-
-
Notifications
You must be signed in to change notification settings - Fork 602
85 lines (73 loc) · 1.96 KB
/
Copy pathdocs.yml
File metadata and controls
85 lines (73 loc) · 1.96 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
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@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit
- uses: actions/checkout@v7
with:
persist-credentials: false
- 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/
npx --yes markdownlint-cli@0.49.1 --config docs/.markdownlint.json docs/docs/
- name: Build docs
run: zensical build --clean
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@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit
- id: deployment
uses: actions/deploy-pages@v5