Skip to content

Commit 4237d87

Browse files
committed
ci: deploy to GitHub Pages
1 parent 55dc0ca commit 4237d87

File tree

14 files changed

+70
-20
lines changed

14 files changed

+70
-20
lines changed

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: lts/*
19+
- uses: pnpm/action-setup@v4
20+
with:
21+
version: 10
22+
- run: pnpm install
23+
- run: pnpm build
24+
- uses: actions/upload-pages-artifact@v3
25+
with:
26+
path: dist
27+
28+
deploy:
29+
needs: build
30+
runs-on: ubuntu-latest
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
steps:
35+
- name: Deploy to GitHub Pages
36+
id: deployment
37+
uses: actions/deploy-pages@v4

demos/astro.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from "astro/config";
2+
3+
// https://astro.build/config
4+
export default defineConfig({
5+
site: "https://jsulpis.github.io",
6+
base: "/talk-webgpu",
7+
});

demos/src/layouts/Layout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const { api = "WebGL" } = Astro.props;
1111
<head>
1212
<meta charset="UTF-8" />
1313
<meta name="viewport" content="width=device-width" />
14-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
14+
<link rel="icon" type="image/svg+xml" href="/talk-webgpu/favicon.svg" />
1515
<meta name="generator" content={Astro.generator} />
1616
<title>Demo</title>
1717
</head>

demos/src/pages/index.astro

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<nav class="panel">
22
<ul>
3-
<li><a href="/three/instanced">three - instanced</a></li>
4-
<li><a href="/three/instanced-webgpu">three - instanced WebGPU</a></li>
5-
<li><a href="/three/fishes">three - fishes</a></li>
6-
<li><a href="/three/fishes-webgpu">three - fishes WebGPU</a></li>
7-
<li><a href="/webgl/boids">webgl - boids</a></li>
8-
<li><a href="/webgl/objects">webgl - objects</a></li>
9-
<li><a href="/webgpu/boids">webgpu - boids</a></li>
10-
<li><a href="/webgpu/objects">webgpu - objects</a></li>
3+
<li><a href="/talk-webgpu/three/instanced">three - instanced</a></li>
4+
<li><a href="/talk-webgpu/three/instanced-webgpu">three - instanced WebGPU</a></li>
5+
<li><a href="/talk-webgpu/three/fishes">three - fishes</a></li>
6+
<li><a href="/talk-webgpu/three/fishes-webgpu">three - fishes WebGPU</a></li>
7+
<li><a href="/talk-webgpu/webgl/boids">webgl - boids</a></li>
8+
<li><a href="/talk-webgpu/webgl/objects">webgl - objects</a></li>
9+
<li><a href="/talk-webgpu/webgpu/boids">webgpu - boids</a></li>
10+
<li><a href="/talk-webgpu/webgpu/objects">webgpu - objects</a></li>
1111
</ul>
1212
</nav>

demos/src/pages/three/fish.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Layout from "../../layouts/Layout.astro";
77
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
88
import { setAnimationLoop } from "../../shared/helpers";
99

10-
const mainFishUrl = "/clownfish.glb";
10+
const mainFishUrl = "/talk-webgpu/clownfish.glb";
1111

1212
const scene = new THREE.Scene();
1313

demos/src/pages/three/fishes-webgpu.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Layout from "../../layouts/Layout.astro";
1010
import { BOUNDS } from "../../shared/params";
1111
import { computeVelocities, computePositions } from "../../three/gpgpu";
1212

13-
const modelUrl = "/Fish.glb";
13+
const modelUrl = "/talk-webgpu/Fish.glb";
1414

1515
const WIDTH = 16;
1616
const FISHES = WIDTH * WIDTH;

demos/src/pages/three/fishes.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import Layout from "../../layouts/Layout.astro";
2525
bounds: BOUNDS,
2626
};
2727

28-
const mainFishUrl = "/clownfish.glb";
29-
const otherfishUrl = "/blueTang.glb";
28+
const mainFishUrl = "/talk-webgpu/clownfish.glb";
29+
const otherfishUrl = "/talk-webgpu/blueTang.glb";
3030

3131
const searchParams = new URL(window.location.href).searchParams;
3232

demos/src/pages/three/instanced-webgpu.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import Layout from "../../layouts/Layout.astro";
2626
let mesh: THREE.InstancedMesh;
2727

2828
const loader = new THREE.BufferGeometryLoader();
29-
loader.load("/suzanne.json", function (geometry) {
29+
loader.load("/talk-webgpu/suzanne.json", function (geometry) {
3030
geometry.computeVertexNormals();
3131
geometry.scale(0.5, 0.5, 0.5);
3232

demos/src/pages/three/instanced.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import Layout from "../../layouts/Layout.astro";
2525
let mesh: THREE.InstancedMesh;
2626

2727
const loader = new THREE.BufferGeometryLoader();
28-
loader.load("/suzanne.json", function (geometry) {
28+
loader.load("/talk-webgpu/suzanne.json", function (geometry) {
2929
geometry.computeVertexNormals();
3030
geometry.scale(0.5, 0.5, 0.5);
3131

demos/src/pages/webgl/boids.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ import Layout from "../../layouts/Layout.astro";
7878
};
7979

8080
// const geometry = createSphereGeometry();
81-
const geometry = await loadOBJ("/fish.obj");
81+
const geometry = await loadOBJ("/talk-webgpu/fish.obj");
8282

8383
const {
8484
compute: computeBoids,

0 commit comments

Comments
 (0)