Skip to content

Commit 4aeaebf

Browse files
stefanhuberclaude
andcommitted
Run schema validation on all branches and PRs to main
Split workflow into validate and deploy jobs so validation runs on every push and PR, while deployment only happens on pushes to main. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a4232a0 commit 4aeaebf

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/pages.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,28 @@ name: Deploy to GitHub Pages
22

33
on:
44
push:
5+
pull_request:
56
branches: [main]
67

78
permissions:
89
pages: write
910
id-token: write
1011

1112
jobs:
13+
validate:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install dependencies
19+
run: pip install check-jsonschema
20+
21+
- name: Validate examples
22+
run: check-jsonschema --schemafile schema.json examples/*/data.json
23+
1224
deploy:
25+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
26+
needs: validate
1327
runs-on: ubuntu-latest
1428
environment:
1529
name: github-pages
@@ -18,10 +32,7 @@ jobs:
1832
- uses: actions/checkout@v4
1933

2034
- name: Install dependencies
21-
run: pip install json-schema-for-humans check-jsonschema
22-
23-
- name: Validate examples
24-
run: check-jsonschema --schemafile schema.json examples/*/data.json
35+
run: pip install json-schema-for-humans
2536

2637
- name: Build site
2738
run: |

0 commit comments

Comments
 (0)