Skip to content

Commit 1a8d6ff

Browse files
authored
docs site cleanup follow up (#430)
1 parent 570b2b7 commit 1a8d6ff

File tree

97 files changed

+1257
-3185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1257
-3185
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ module.exports = {
9090
rules: {
9191
'@typescript-eslint/consistent-type-exports': 'off',
9292
'@typescript-eslint/consistent-type-imports': 'off',
93+
'@typescript-eslint/no-var-requires': 'off',
9394
},
9495
},
9596
],
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Confirm Route Changes
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
jobs:
8+
validate-routes:
9+
name: Validate Generated Routes
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
shell: bash
14+
working-directory: .
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0 # Need full history for git log in index-routes.ts
20+
- name: Read Node.js version from package.json
21+
run: echo "nodeVersion=$(node -p "require('./package.json').engines.node")" >> $GITHUB_OUTPUT
22+
id: engines
23+
- name: Setup Node
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ steps.engines.outputs.nodeVersion }}
27+
- name: Install dependencies
28+
run: yarn --immutable
29+
- name: Backup current routes.json
30+
run: cp -f generated/routes.json generated/routes.json.original
31+
- name: Regenerate routes.json
32+
run: yarn generate:route-index
33+
- name: Create comparison files with just routes and filepaths
34+
run: |
35+
jq 'map_values({relPath})' generated/routes.json > routes.paths.json
36+
jq 'map_values({relPath})' generated/routes.json.original > routes.original.paths.json
37+
- name: Compare route paths
38+
run: |
39+
if ! diff -q routes.paths.json routes.original.paths.json > /dev/null; then
40+
echo "Error: The routes.json file is out of sync with the docs structure."
41+
echo "Please run 'yarn generate:route-index' and commit the updated file."
42+
diff -u routes.original.paths.json routes.paths.json || true
43+
exit 1
44+
fi
45+
echo "Routes validation passed: routes.json is up to date."

.github/workflows/lint.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ on:
77
jobs:
88
lint:
99
name: Lint
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
defaults:
1212
run:
1313
shell: bash
1414
working-directory: .
1515
steps:
16-
- name: 'Checkout'
16+
- name: Checkout
1717
uses: actions/checkout@v3
1818
- name: Read Node.js version from package.json
1919
run: echo "nodeVersion=$(node -p "require('./package.json').engines.node")" >> $GITHUB_OUTPUT
2020
id: engines
21-
- name: 'Setup Node'
21+
- name: Setup Node
2222
uses: actions/setup-node@v3
2323
with:
2424
node-version: ${{ steps.engines.outputs.nodeVersion }}

.github/workflows/pr-labels.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: Pull Request Labels
22
on:
33
pull_request:
4-
branches: [ master ]
4+
branches: [main]
55
types: [opened, labeled, unlabeled, synchronize]
66
jobs:
77
label:
88
name: Check that PR has required labels
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1010
steps:
1111
- uses: mheap/github-action-required-labels@v5
1212
with:
1313
mode: exactly
1414
count: 1
15-
labels: "bug-fix, enhancement, breaking-change, dependencies"
15+
labels: 'bug-fix, enhancement, breaking-change, dependencies'

.github/workflows/trivy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
trivy-scan:
99
name: Trivy fs scan
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
permissions:
1212
contents: read # for actions/checkout to fetch code
1313
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results

0 commit comments

Comments
 (0)