Skip to content

Merge branch 'master' into lint-404s #17

Merge branch 'master' into lint-404s

Merge branch 'master' into lint-404s #17

Workflow file for this run

name: Lint Docs for 404s
on:
push:
branches: [lint-404s]
pull_request:
branches: [lint-404s]
jobs:
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'
- name: Start Http Server
run: yarn start &
if: steps.filter.outputs.docs == 'true' || steps.filter.outputs.dev-docs == 'true'
- name: Lint 404s
run: bun ./scripts/lint-404s/main.ts
if: steps.filter.outputs.docs == 'true' || steps.filter.outputs.dev-docs == 'true'
- name: Kill Http Server
run: kill $(lsof -t -i:3000) || true
if: steps.filter.outputs.docs == 'true' || steps.filter.outputs.dev-docs == 'true'
continue-on-error: true