Skip to content

Commit 423d45c

Browse files
committed
feat: generate JSON schema from Zod at build time
1 parent 81bc380 commit 423d45c

File tree

4 files changed

+2067
-1
lines changed

4 files changed

+2067
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy JSON Schema to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main, feat/json-schema-generation]
6+
paths: ['schemas/**']
7+
workflow_dispatch:
8+
9+
permissions:
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
deploy:
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/configure-pages@v5
26+
- uses: actions/upload-pages-artifact@v3
27+
with:
28+
path: schemas
29+
- id: deployment
30+
uses: actions/deploy-pages@v4

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
],
4646
"scripts": {
4747
"postinstall": "node scripts/check-old-cli.mjs",
48-
"build": "npm run build:lib && npm run build:cli && npm run build:assets",
48+
"build": "npm run build:lib && npm run build:cli && npm run build:assets && npm run build:schema",
49+
"build:schema": "node scripts/generate-schema.mjs",
4950
"build:lib": "tsc -p tsconfig.build.json",
5051
"build:cli": "node esbuild.config.mjs",
5152
"build:assets": "node scripts/copy-assets.mjs",

0 commit comments

Comments
 (0)