ci: add GitHub Actions workflow to build and deploy to GitHub Pages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 21:51:52 +07:00
co-authored by Claude Opus 4.6
parent bed7ebfbc5
commit a59cee869c
2 changed files with 47 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm test
- run: npm run build
- uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
+1
View File
@@ -3,6 +3,7 @@ import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
base: "/try-superpowers/",
plugins: [react()],
test: {
globals: true,