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
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy to GitHub Pages

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

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

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@
<link rel="stylesheet" href="assets/css/index.css">
</head>
<body>
<div id="webgpu-error" style="display: none; text-align: center; padding: 50px; font-family: Arial, sans-serif;">
<h1 style="color: #e74c3c;">WebGPU Not Supported</h1>
<p>This application requires WebGPU support. Please use:</p>
<ul style="text-align: left; display: inline-block;">
<li>Chrome 113+ or Edge 113+</li>
<li>Enable WebGPU in experimental features if needed</li>
</ul>
</div>
<canvas width="800" height="600"></canvas>
<script>
if (!navigator.gpu) {
document.getElementById('webgpu-error').style.display = 'block';
document.querySelector('canvas').style.display = 'none';
}
</script>
<script type="module" src="src/index.js"></script>
</body>
</html>
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npx vite"
"start": "npx vite",
"build": "vite build",
"preview": "vite preview"
},
"author": "",
"license": "ISC",
Expand Down
1 change: 1 addition & 0 deletions public/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pro.gramming.party
10 changes: 10 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from 'vite'

export default defineConfig({
base: '/5s/particles/2025/',
build: {
outDir: 'dist',
assetsDir: 'assets',
target: 'es2022'
}
})
Loading