-
Notifications
You must be signed in to change notification settings - Fork 3
137 lines (117 loc) · 3.72 KB
/
docs.yaml
File metadata and controls
137 lines (117 loc) · 3.72 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Docs
on:
pull_request:
paths:
- docs/**
- mkdocs.yml
- .cspell.json
- .markdownlint-cli2.yaml
- .github/workflows/docs.yaml
push:
branches: [main]
paths:
- docs/**
- mkdocs.yml
- .cspell.json
- .markdownlint-cli2.yaml
- .github/workflows/docs.yaml
workflow_dispatch:
permissions:
contents: read
concurrency:
group: github-pages
cancel-in-progress: false
jobs:
docs-quality:
runs-on: depot-ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
- name: Install docs lint tools
run: npm install --global cspell@8.19.4 markdownlint-cli2@0.18.1
- name: Lint Markdown
run: markdownlint-cli2 "docs/**/*.md"
- name: Spell-check docs
run: cspell --no-progress --config .cspell.json "docs/**/*.md" "mkdocs.yml"
- name: Check links (including external)
uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2.6.1
with:
fail: true
args: >-
--verbose
--no-progress
--accept 200,429
--max-retries 2
--retry-wait-time 2
--exclude '^https://github.com/coder/coder-k8s$'
docs/*.md docs/*/*.md docs/*/*/*.md
mkdocs.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
if: github.event_name == 'pull_request'
needs: docs-quality
runs-on: depot-ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build docs (strict)
run: mkdocs build --strict
deploy:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: docs-quality
runs-on: depot-ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Set up Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build docs (strict)
run: mkdocs build --strict
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5