/ concept-collection / benchcompress
Sign in
concept-collection / benchcompress
deploy to gh pages
Jeremy Magland <jmagland@flatironinstitute.org> committed commit bb5262d1f432 parent a4762fa Browse files
3 changed files+52−2
.github/workflows/deploy-gh-pages.ymladded+49−0View file
@@ -0,0 +1,49 @@
1+name: Deploy to GitHub Pages
2+on:
3+ push:
4+ branches: ['main']
5+ paths:
6+ - 'web-ui/**'
7+ workflow_dispatch:
8+
9+# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
10+permissions:
11+ contents: read
12+ pages: write
13+ id-token: write
14+
15+# Allow one concurrent deployment
16+concurrency:
17+ group: 'pages'
18+ cancel-in-progress: true
19+
20+jobs:
21+ # Single deploy job since we're just deploying
22+ deploy:
23+ environment:
24+ name: github-pages
25+ url: ${{ steps.deployment.outputs.page_url }}
26+ runs-on: ubuntu-latest
27+ steps:
28+ - name: Checkout
29+ uses: actions/checkout@v4
30+ - name: Set up Node
31+ uses: actions/setup-node@v4
32+ with:
33+ node-version: 20
34+ cache: 'npm'
35+ cache-dependency-path: './web-ui/package-lock.json'
36+ - name: Install dependencies
37+ run: cd web-ui && npm install
38+ - name: Build
39+ run: cd web-ui && npm run build
40+ - name: Setup Pages
41+ uses: actions/configure-pages@v4
42+ - name: Upload artifact
43+ uses: actions/upload-pages-artifact@v3
44+ with:
45+ # Upload dist folder
46+ path: './web-ui/dist'
47+ - name: Deploy to GitHub Pages
48+ id: deployment
49+ uses: actions/deploy-pages@v4
web-ui/tsconfig.node.jsonmodified+2−2View file
@@ -1,5 +1,6 @@
11 {
22 "compilerOptions": {
3+ "incremental": true,
34 "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
45 "target": "ES2022",
56 "lib": ["ES2023"],
@@ -17,8 +18,7 @@
1718 "strict": true,
1819 "noUnusedLocals": true,
1920 "noUnusedParameters": true,
20- "noFallthroughCasesInSwitch": true,
21- "noUncheckedSideEffectImports": true
21+ "noFallthroughCasesInSwitch": true
2222 },
2323 "include": ["vite.config.ts"]
2424 }
web-ui/vite.config.tsmodified+1−0View file
@@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react'
44 // https://vite.dev/config/
55 export default defineConfig({
66 plugins: [react()],
7+ base: '/zia/', // Base URL for GitHub Pages deployment
78 })
moveopenescclose