-
Notifications
You must be signed in to change notification settings - Fork 1
97 lines (92 loc) · 2.6 KB
/
docs-ci.yml
File metadata and controls
97 lines (92 loc) · 2.6 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
name: Docs CI
on:
push:
branches: [main]
paths:
- "docs/**"
- ".github/workflows/docs-ci.yml"
pull_request:
branches: [main]
paths:
- "docs/**"
- ".github/workflows/docs-ci.yml"
# Cancel in-progress runs for the same branch/PR to save resources
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
format:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: "10.11.0"
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/docs/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: ./docs
run: pnpm install
- name: Check formatting
working-directory: ./docs
run: pnpm prettier --check .
build:
name: Validate Build
runs-on: ubuntu-latest
needs: [format]
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: "10.11.0"
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/docs/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: ./docs
run: pnpm install
- name: Validate build
working-directory: ./docs
run: pnpm build
vale-lint:
name: Vale lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: errata-ai/vale-action@v2.1.1
continue-on-error: true
with:
files: "docs/src/content/"
reporter: github-check