mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
For local dev and CI we want to have the eslint-local-rules running, so let's make sure both have their dependencies installed. We don't use a monorepo setup here, which is why they're currently setup as a two completely independent yarn workspaces.
38 lines
863 B
YAML
38 lines
863 B
YAML
name: Site Lint / Heading ID check
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main # change this if your default branch is named differently
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Lint on node 20.x and ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js 20.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20.x
|
|
cache: yarn
|
|
cache-dependency-path: yarn.lock
|
|
|
|
- name: Restore cached node_modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: '**/node_modules'
|
|
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
|
|
|
- name: Install deps
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Lint codebase
|
|
run: yarn ci-check
|