-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
54 lines (45 loc) · 1.56 KB
/
lint-404s.yml
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
name: Lint Docs for 404s
on:
push:
branches: [lint-404s]
pull_request:
branches: [lint-404s]
jobs:
index:
name: Update Algolia index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
- 'includes/**'
- 'platform-includes/**'
dev-docs:
- 'develop-docs/**'
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: actions/cache@v4
id: cache
with:
path: ${{ github.workspace }}/node_modules
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.cache.outputs.cache-hit != 'true'
# Remove the changelog directory to avoid a build error due to missing `DATABASE_URL`
# and save some build time.
- run: rm -r app/changelog
- run: yarn build
if: steps.filter.outputs.docs == 'true'
- run: yarn build:developer-docs
if: steps.filter.outputs.dev-docs == 'true'
# bun seems to be the most straightforward way to run a TypeScript script
# without introducing another dependency like ts-node or tsx for everyone else
# build docs index
- run: bun ./scripts/lint-404s/main.ts
if: steps.filter.outputs.docs == 'true' || steps.filter.outputs.dev-docs == 'true'