-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (80 loc) · 2.26 KB
/
Copy pathdocs.yml
File metadata and controls
94 lines (80 loc) · 2.26 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
name: Docs
on:
pull_request:
paths:
- 'docs/**'
- 'README.md'
- 'CONTRIBUTING.md'
- '.markdownlint-cli2.yaml'
- '.vale.ini'
- '.vale/**'
- '.github/workflows/docs.yml'
push:
branches: [main]
paths:
- 'docs/**'
- 'README.md'
- 'CONTRIBUTING.md'
- '.markdownlint-cli2.yaml'
- '.vale.ini'
- '.vale/**'
- '.github/workflows/docs.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
name: Markdown lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Run markdownlint
run: npx markdownlint-cli2 "docs/book/src/**/*.md" "README.md" "CONTRIBUTING.md"
vale:
name: Style check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Install Vale
run: |
wget -qO- https://github.com/errata-ai/vale/releases/download/v3.13.1/vale_3.13.1_Linux_64-bit.tar.gz | tar xz -C /usr/local/bin vale
vale --version
- name: Vale sync
run: vale sync
- name: Vale lint (errors only)
run: vale --minAlertLevel error docs/book/src/
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Install mdbook
uses: taiki-e/install-action@v2
with:
tool: mdbook
- name: Build book
run: mdbook build docs/book
- name: Upload artifact
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/upload-pages-artifact@v3
with:
path: docs/book/book/html
deploy:
name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: [lint, vale, build]
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4