Check website format in CI (#2454)

Add a command to lint the website to package.json, and update the
workflow. Updates docs for linting as well.

---------

Co-authored-by: Jade Turner <spacey-sooty@proton.me>
This commit is contained in:
Sam Freund
2026-05-02 01:02:05 -05:00
committed by Matt Morley
parent 4c9b36aa5c
commit 3c017ab961
3 changed files with 21 additions and 6 deletions

View File

@@ -36,6 +36,9 @@ jobs:
format-check:
name: Check Formatting
defaults:
run:
working-directory: website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@@ -49,7 +52,11 @@ jobs:
cache-dependency-path: website/pnpm-lock.yaml
- name: Install Packages
run: pnpm i --frozen-lockfile
working-directory: website
- name: Run Formatting Check
run: pnpm prettier -c .
working-directory: website
- run: |
set +e
pnpm run format-ci
exit_code=$?
if test "$exit_code" -ne "0"; then
echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html"
fi
exit $exit_code