-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.79 KB
/
deploy.yml
File metadata and controls
62 lines (50 loc) · 1.79 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy Docs to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: '2'
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies (Deno for type-check, npm for vite binary)
run: |
deno install --node-modules-dir
cd docs && npm install
- name: Build @kissjs/ui (needed by SSR bundle)
working-directory: packages/kiss-ui
run: npx vite build --config vite.config.build.ts
- name: Phase 1 — SSR bundle
working-directory: docs
run: npx vite build
- name: Phase 2 — Client island chunks
working-directory: docs
run: npx tsx ../packages/kiss-core/src/cli/build-client.ts
- name: Phase 3 — SSG static HTML
working-directory: docs
run: npx tsx ../packages/kiss-core/src/cli/build-ssg.ts
- name: Deploy to gh-pages branch
run: |
cd docs/dist
# Cache-bust: unique version file so GitHub Pages CDN treats
# each deploy as new content (no stale edge cache)
echo "$(date -u +%Y%m%dT%H%M%S)" > .version
git init
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
echo "kiss.js.org" > CNAME
git add -A
git commit -m "Deploy KISS docs site — $(date -u +%Y-%m-%dT%H:%M:%SZ)"
git push -f https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:gh-pages