|
1 |
| -# Docs validation workflow runs on each PR on main w/ broken link checker |
2 |
| -# and code snippet validation |
3 |
| - |
4 | 1 | name: Docs validation
|
5 | 2 |
|
6 |
| -on: |
7 |
| - pull_request: |
8 |
| - branches: |
9 |
| - - main |
10 |
| - push: |
11 |
| - branches: |
12 |
| - - main |
| 3 | +on: pull_request |
13 | 4 |
|
14 | 5 | jobs:
|
15 |
| -link-check: |
16 |
| - name: Broken link checker |
17 |
| - runs-on: ubuntu-latest |
| 6 | + prettier-check: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + steps: |
| 9 | + - uses: actions/checkout@v4 |
| 10 | + |
| 11 | + - uses: the-guild-org/shared-config/setup@main |
| 12 | + name: setup env |
| 13 | + with: |
| 14 | + packageManager: pnpm |
| 15 | + workingDirectory: ./ |
| 16 | + |
| 17 | + - name: Install Dependencies |
| 18 | + run: pnpm i |
| 19 | + |
| 20 | + - name: Run Prettier Check |
| 21 | + run: pnpm format:check |
| 22 | + |
| 23 | + link-check: |
| 24 | + name: Broken link checker |
| 25 | + runs-on: ubuntu-latest |
18 | 26 |
|
19 |
| - steps: |
20 |
| - - name: Checkout code |
21 |
| - uses: actions/checkout@v4 |
| 27 | + steps: |
| 28 | + - name: Checkout code |
| 29 | + uses: actions/checkout@v4 |
22 | 30 |
|
23 |
| - - name: Set up Node.js |
24 |
| - uses: actions/setup-node@v4 |
25 |
| - with: |
26 |
| - node-version: "20" |
27 |
| - cache: "pnpm" |
| 31 | + - uses: the-guild-org/shared-config/setup@main |
| 32 | + name: setup env |
| 33 | + with: |
| 34 | + packageManager: pnpm |
| 35 | + workingDirectory: ./ |
28 | 36 |
|
29 |
| - - name: Install dependencies |
30 |
| - run: pnpm install --frozen-lockfile |
| 37 | + - name: Install Dependencies |
| 38 | + run: pnpm i |
31 | 39 |
|
32 |
| - - name: Build static site |
33 |
| - run: pnpm build |
| 40 | + - name: Build static site |
| 41 | + run: pnpm build |
34 | 42 |
|
35 |
| - - name: Set up Rust |
36 |
| - uses: actions-rs/toolchain@v1 |
37 |
| - with: |
38 |
| - toolchain: stable |
| 43 | + - name: Set up Rust |
| 44 | + uses: actions-rs/toolchain@v1 |
| 45 | + with: |
| 46 | + toolchain: stable |
39 | 47 |
|
40 |
| - - name: Install lychee |
41 |
| - run: cargo install lychee |
| 48 | + - name: Install lychee |
| 49 | + run: cargo install lychee |
42 | 50 |
|
43 |
| - - name: Check links |
44 |
| - run: lychee --verbose --no-progress './out/**/*.html' |
| 51 | + - name: Check links |
| 52 | + run: lychee --verbose --no-progress './out/**/*.html' |
45 | 53 |
|
46 |
| -code-validate: |
47 |
| - name: Code snippet and GraphQL validation |
48 |
| - runs-on: ubuntu-latest |
49 |
| - steps: |
50 |
| - - uses: actions/checkout@v4 |
| 54 | + code-validate: |
| 55 | + name: Code snippet and GraphQL validation |
| 56 | + runs-on: ubuntu-latest |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@v4 |
51 | 59 |
|
52 |
| - - uses: actions/setup-node@v4 |
53 |
| - with: |
54 |
| - node-version: "20" |
55 |
| - cache: "pnpm" |
| 60 | + - uses: the-guild-org/shared-config/setup@main |
| 61 | + name: setup env |
| 62 | + with: |
| 63 | + packageManager: pnpm |
| 64 | + workingDirectory: ./ |
56 | 65 |
|
57 |
| - - name: Install dependencies |
58 |
| - run: pnpm install --frozen-lockfile |
| 66 | + - name: Install Dependencies |
| 67 | + run: pnpm i |
59 | 68 |
|
60 |
| - - name: Run validation w/ annotations |
61 |
| - run: pnpm lint:docs:ci |
| 69 | + - name: Run validation w/ annotations |
| 70 | + run: pnpm lint:docs:ci |
62 | 71 |
|
63 |
| - - name: Validate code snippets |
64 |
| - run: pnpm validate:snippets |
| 72 | + - name: Validate code snippets |
| 73 | + run: pnpm validate:snippets |
0 commit comments