Skip to content

Commit 4c9b2c9

Browse files
committed
ci: deploy solid app to gh pages instead of static pages
1 parent ad5f5b0 commit 4c9b2c9

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches: [main]
6-
paths: ['output/**']
6+
paths: ['TheGreenEpochWeb/**']
77
workflow_dispatch:
88

99
permissions:
@@ -18,16 +18,27 @@ concurrency:
1818
jobs:
1919
build:
2020
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: TheGreenEpochWeb
2124
steps:
2225
- uses: actions/checkout@v7
2326

24-
- name: Prepare static files
25-
run: cp output/overview.html output/index.html
27+
- name: Install pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
version: latest
31+
32+
- name: Install dependencies
33+
run: pnpm install
34+
35+
- name: Build
36+
run: pnpm build
2637

2738
- name: Upload artifact
2839
uses: actions/upload-pages-artifact@v5
2940
with:
30-
path: output/
41+
path: TheGreenEpochWeb/dist/
3142

3243
- name: Deploy to GitHub Pages
3344
id: deployment

TheGreenEpochWeb/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import devtools from 'solid-devtools/vite';
77
import tailwindcss from '@tailwindcss/vite';
88

99
export default defineConfig({
10+
base: process.env.GITHUB_ACTIONS ? '/TheGreenEpoch/' : '/',
1011
plugins: [tailwindcss(), devtools(), solidPlugin()],
1112
server: {
1213
port: 3000,

0 commit comments

Comments
 (0)