mirror of
https://github.com/cloudflare/cloudflare-docs.git
synced 2026-01-11 20:06:58 +00:00
* [Docs Site] Adopt eslint * Demonstrate a fixable suggestion, add VSCode plugin and package.json script * Fix slice in ModelCatalog * Remove test error in AnchorHeading * recreate package-lock.json * update new .jsx components to .tsx * amend deps, fix react types, organise ec plugins * another attempt at fixing platform-specific deps * fix FieldCatalog filters, remove test block from code.mdx * use opacity instead of brightness for ruleid * fix lockfile * amend ruleid opacity styling * test onetrust * enable prefer const rule, remove onetrust test * add save-dev
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- production
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
compile:
|
|
name: Compiles
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: "npm"
|
|
- uses: actions/cache/restore@v4
|
|
with:
|
|
path: |
|
|
node_modules/.astro
|
|
key: static
|
|
|
|
- run: npm ci
|
|
- run: npm run check
|
|
|
|
- uses: reviewdog/action-eslint@v1
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
reporter: github-pr-review
|
|
fail_level: "error"
|
|
|
|
- run: npm run format:core:check
|
|
## TODO: content formatting checks
|
|
- run: npm run build
|
|
env:
|
|
NODE_OPTIONS: "--max-old-space-size=4192"
|
|
RUN_LINK_CHECK: true
|
|
|
|
- run: npm run check:worker
|
|
|
|
- uses: actions/cache/save@v4
|
|
with:
|
|
path: |
|
|
node_modules/.astro
|
|
key: static
|
|
|
|
- name: Check - Validate redirects (infinite loops, sources with fragment)
|
|
run: npx tsm bin/validate-redirects.ts
|
|
|
|
- name: Tests
|
|
run: npm run test
|