-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (35 loc) · 1.11 KB
/
test-docs.yml
File metadata and controls
37 lines (35 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: "Test the docs"
on:
push:
workflow_call:
jobs:
build:
name: Test the docs
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: actions/checkout@v4
- run: npm ci
- run: npm run build
- run: npm run format-check
- run: npm run lint
- name: Verify no unstaged changes
shell: bash
run: |
if [[ "$(git status --porcelain)" != "" ]]; then
echo ----------------------------------------
echo git status
echo ----------------------------------------
git status
echo ----------------------------------------
echo git diff
echo ----------------------------------------
git diff
echo ----------------------------------------
echo Troubleshooting
echo ----------------------------------------
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && npm ci && npm run format && npm run build"
exit 1
fi