release: core → 0.5.0-alpha.2 (alpha-1 already on JSR) #270
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |