Skip to content

ci: add GitHub Actions workflow for linting and formatting checks #4

ci: add GitHub Actions workflow for linting and formatting checks

ci: add GitHub Actions workflow for linting and formatting checks #4

Workflow file for this run

name: Run Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check-frontend:
name: Check Site
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install frontend dependencies
run: pnpm install
- name: Format with Prettier
uses: EPMatt/reviewdog-action-prettier@v1
with:
level: warning
reporter: github-pr-review
prettier_flags: apps/site/src
- name: Lint with ESLint (review)
uses: reviewdog/action-eslint@v1
if: github.event_name == 'pull_request'
with:
level: error
reporter: github-pr-review
eslint_flags: apps/site/src
- name: Lint with ESLint (check)
uses: reviewdog/action-eslint@v1
if: github.event_name == 'push'
with:
workdir: apps/site
level: error
reporter: github-check
eslint_flags: src