Skip to content

Commit 4e388cb

Browse files
committed
first
1 parent b01dff3 commit 4e388cb

File tree

248 files changed

+64686
-11461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+64686
-11461
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: pnpm/action-setup@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 22
18+
cache: pnpm
19+
- run: pnpm install --frozen-lockfile
20+
- run: pnpm --filter @spec-spac/spac build
21+
- run: pnpm --filter @spec-spac/spac test
22+
- run: pnpm --filter @spec-spac/from-openapi build
23+
- run: pnpm --filter @spec-spac/from-openapi test

.github/workflows/deploy-pages.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
env:
21+
GITHUB_PAGES: true
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: pnpm/action-setup@v4
26+
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: 22
30+
cache: pnpm
31+
32+
- run: pnpm install --frozen-lockfile
33+
34+
# Sync large examples (cloudflare spec)
35+
- run: bash scripts/sync-examples.sh
36+
37+
# Build spac core + from-openapi (website + playground depend on them)
38+
- run: pnpm --filter @spec-spac/spac build
39+
- run: pnpm --filter @spec-spac/from-openapi build
40+
41+
# Build website (Next.js static export)
42+
- run: pnpm --filter website build
43+
44+
# Build playground (Vite)
45+
- run: pnpm --filter spac-playground generate
46+
- run: pnpm --filter spac-playground build
47+
env:
48+
GITHUB_PAGES: true
49+
50+
# Assemble combined site
51+
- name: Assemble _site
52+
run: |
53+
mkdir -p _site
54+
cp -r packages/website/out/* _site/
55+
mkdir -p _site/playground
56+
cp -r packages/playground/dist/* _site/playground/
57+
58+
# SPA fallback for playground client-side routes
59+
cat > _site/404.html << 'FOUROHFOUR'
60+
<!DOCTYPE html><html><head><meta charset="utf-8"><script>
61+
var p = window.location.pathname;
62+
if (p.startsWith('/spac/playground')) {
63+
var base = '/spac/playground/';
64+
var route = p.slice(base.length);
65+
window.location.replace(base + '?route=' + encodeURIComponent(route) + window.location.hash);
66+
}
67+
</script></head><body></body></html>
68+
FOUROHFOUR
69+
70+
- uses: actions/upload-pages-artifact@v3
71+
with:
72+
path: _site
73+
74+
deploy:
75+
needs: build
76+
runs-on: ubuntu-latest
77+
environment:
78+
name: github-pages
79+
url: ${{ steps.deployment.outputs.page_url }}
80+
steps:
81+
- id: deployment
82+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,17 @@ node_modules
22
dist
33
*.tsbuildinfo
44
.DS_Store
5-
packages/examples/cloudflare/*
5+
.agents
6+
.vercel
7+
skills-lock.json
8+
node-compile-cache/
9+
tsx-501/
10+
11+
# Large examples — synced from the `examples` orphan branch via `pnpm sync-examples`
12+
packages/examples/cloudflare/
13+
14+
# Generated from specs by codegen-from-specs.ts — always regenerated, never hand-edited
15+
packages/playground/scripts/petstore/
16+
packages/playground/scripts/plantstore/
17+
packages/playground/scripts/serpapi/
18+
packages/playground/scripts/cloudflare/

0 commit comments

Comments
 (0)