Skip to content

Commit

Permalink
pages workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Jul 11, 2024
1 parent a007398 commit 25b4bab
Show file tree
Hide file tree
Showing 23 changed files with 81 additions and 22 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 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
- id: configurepages
uses: actions/configure-pages@v5
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- run: npm ci
- uses: rharkor/[email protected]
- run: npm run build
- run: |
DST="out"
for app in apps/*; do
if [ -d "$app/dist" ]; then
app_name=$(basename "$app")
mkdir -p "$DST/$app_name"
cp -r "$app/dist/"* "$DST/$app_name/"
echo "Copied $app/dist to $DST/$app_name"
fi
done
- uses: actions/upload-pages-artifact@v3
with:
path: ./out

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion apps/arkanoid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/bvh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/csg-bunny-usegroups/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/csg-operations-rapier-physics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/flexbox-yoga-in-webgl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"eslintConfig": {
Expand Down
2 changes: 1 addition & 1 deletion apps/gpgpu-curl-noise-dof/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/grass-shader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/infinite-scroll/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/interactive-spline-scene-live-html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/moksha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/motionpathcontrols/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/object-clump/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/pass-through-portals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/racing-game/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/raycast-cycling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/shader-fire/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/space-game/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/sparks-and-effects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/spline-glass-shapes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/t-shirt-configurator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/threejs-journey-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion apps/viking-ship/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"scripts": {
"dev": "vite --host --open",
"build": "tsc && vite build",
"bbuild": "tsc && vite build",
"preview": "vite preview"
},
"eslintConfig": {
Expand Down

0 comments on commit 25b4bab

Please sign in to comment.