workflows: Add check for manual changes to API

This adds a check to ensure that the code generated automatically by `npm run api` has no manual changes.
This commit is contained in:
regexowl 2023-12-21 14:14:49 +01:00 committed by Lucas Garfield
parent d96ebc9b3e
commit 6346cc50e4

View file

@ -21,6 +21,8 @@ jobs:
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Check for manual changes to API
run: npm run api && [ -z "$(git status --porcelain=v1 2>/dev/null)" ] && echo "✓ No manual API changes." || echo "✗ API manually changed, please refer to the README for the procedure to follow for programmatically generated API endpoints." && [ -z "$(git status --porcelain=v1 2>/dev/null)" ]
- name: Run build
run: npm run build
- name: Run lint check