Skip to content

Commit 3a6a244

Browse files
committed
github pages hosting
1 parent 55bf8b9 commit 3a6a244

File tree

4 files changed

+60
-4
lines changed

4 files changed

+60
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build
35+
run: npm run build
36+
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: './dist'
44+
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": "vite",
88
"build": "tsc -b && vite build",
99
"lint": "eslint .",
10-
"preview": "vite preview"
10+
"preview": "vite preview",
11+
"deploy": "npm run build && gh-pages -d dist"
1112
},
1213
"dependencies": {
1314
"react": "^19.2.0",

src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ function App() {
2727
const animationFrameRef = useRef<number | undefined>(undefined)
2828
const lastTimeRef = useRef<number>(0)
2929

30-
const [tableSpinInterval, setTableSpinInterval] = useState<number>(480)
31-
const [onDeckJiggleInterval, setOnDeckJiggleInterval] = useState<number>(420)
32-
const [pulseDuration, setPulseDuration] = useState<number>(30)
30+
const [tableSpinInterval, setTableSpinInterval] = useState<number>(120)
31+
const [onDeckJiggleInterval, setOnDeckJiggleInterval] = useState<number>(110)
32+
const [pulseDuration, setPulseDuration] = useState<number>(15)
3333
const [tableSpinEnabled, setTableSpinEnabled] = useState<boolean>(true)
3434
const [onDeckJiggleEnabled, setOnDeckJiggleEnabled] = useState<boolean>(true)
3535

vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react'
44
// https://vite.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7+
base: '/rumble-display/',
78
})

0 commit comments

Comments
 (0)