Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy to GitHub Pages

on:
push:
branches: [main]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm

- run: npm ci

- name: Build
run: npm run build

- uses: actions/upload-pages-artifact@v3
with:
path: web/dist

deploy:
needs: build
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Game Gallery</title>
<title>Vibe Coded</title>

<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="/labset-frosted-dark.svg" />
Expand All @@ -12,7 +12,7 @@

<!-- Apple touch icon (home screen pin) -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="Game Gallery" />
<meta name="apple-mobile-web-app-title" content="Vibe Coded" />
<meta name="mobile-web-app-capable" content="yes" />
<meta
name="apple-mobile-web-app-status-bar-style"
Expand Down
4 changes: 2 additions & 2 deletions web/public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Game Gallery",
"short_name": "Games",
"name": "Vibe Coded",
"short_name": "Vibe Coded",
"icons": [
{
"src": "/icon-192.png",
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/app-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function AppLayout({ children }: AppLayoutProps) {
<div className="min-h-svh bg-sidebar text-sidebar-foreground">
<header className="sticky top-0 z-30 h-14 border-b border-sidebar-border bg-sidebar">
<div className="mx-auto flex h-full max-w-5xl items-center justify-between px-4 sm:px-6">
<h1 className="text-lg font-semibold tracking-tight">Game Gallery</h1>
<h1 className="text-lg font-semibold tracking-tight">Vibe Coded</h1>
<ThemeSwitcher />
</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion web/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ThemeProvider } from "@/components/theme-provider";
import { routeTree } from "./routeTree.gen";
import "./index.css";

const router = createRouter({ routeTree });
const router = createRouter({ routeTree, basepath: "/vibe-coded" });

declare module "@tanstack/react-router" {
interface Register {
Expand Down
24 changes: 22 additions & 2 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
import fs from "fs";
import path from "path";
import { defineConfig } from "vite";
import { defineConfig, type Plugin } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";

function spaFallback(): Plugin {
return {
name: "spa-fallback",
closeBundle() {
const dist = path.resolve(__dirname, "dist");
fs.copyFileSync(
path.join(dist, "index.html"),
path.join(dist, "404.html"),
);
},
};
}

// https://vite.dev/config/
export default defineConfig({
plugins: [TanStackRouterVite({ target: "react" }), react(), tailwindcss()],
base: "/vibe-coded/",
plugins: [
TanStackRouterVite({ target: "react" }),
react(),
tailwindcss(),
spaFallback(),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
Expand Down
Loading