Skip to content

Commit

Permalink
404 linter github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
a-hariti committed Jul 23, 2024
1 parent 5cad8db commit def448b
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/lint-404s.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Lint Docs for 404s

on:
push:
branches: [master]
pull_request:
branches: [master]

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.ts

0 comments on commit def448b

Please sign in to comment.