ci: add GitHub Actions workflow for GitHub Pages deployment
Some checks failed
Deploy to GitHub Pages / build (push) Has been cancelled
Deploy to GitHub Pages / deploy (push) Has been cancelled

- pnpm 10 + Node 22 for fastest CI
- Frozen lockfile, upload-pages-artifact v3, deploy-pages v4
- Vite base path set to /skwik/ when building in GHA
- Concurrency group cancels in-progress deploys

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Samuel Prevost 2026-04-14 23:28:36 +02:00
parent bf20518083
commit f3d065e610
2 changed files with 51 additions and 0 deletions

50
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,50 @@
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: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
env:
NODE_OPTIONS: --max-old-space-size=4096
- 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

View File

@ -4,6 +4,7 @@ import tailwindcss from "@tailwindcss/vite";
import { resolve } from "node:path";
export default defineConfig({
base: process.env.GITHUB_ACTIONS ? "/skwik/" : "/",
plugins: [vue(), tailwindcss()],
resolve: {
alias: {