Skip to content

Commit fd7c9a1

Browse files
committed
end this pain
1 parent 66e0652 commit fd7c9a1

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

.github/workflows/cd.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,18 @@ jobs:
3939
- name: Build
4040
run: pnpm run build
4141
env:
42-
BASE_URL: /IME/
42+
BASE_PATH: /IME/
4343

4444
- name: Upload artifact
4545
uses: actions/upload-pages-artifact@v3
4646
with:
47-
path: ".output/public"
47+
path: "./.output/public"
4848

49-
deploy:
50-
name: Deploy to GitHub Pages
51-
needs: build
52-
runs-on: ubuntu-latest
53-
environment:
54-
name: github-pages
55-
url: ${{ steps.deployment.outputs.page_url }}
56-
steps:
57-
- name: Deploy to GitHub Pages
58-
id: deployment
59-
uses: actions/deploy-pages@v4
49+
- name: create .nojekyll
50+
run: touch .output/public/.nojekyll
51+
52+
- name: deploy pages
53+
uses: JamesIves/[email protected]
54+
with:
55+
branch: gh-pages
56+
folder: .output/public

app.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import eslint from "vite-plugin-eslint";
55
import Icons from "unplugin-icons/vite";
66

77
export default defineConfig({
8-
ssr: false,
8+
ssr: true,
99
server: {
10-
baseURL: process.env.BASE_URL,
11-
preset: "github_pages",
10+
baseURL: process.env.BASE_PATH,
11+
preset: "static",
1212
},
1313
vite: {
1414
plugins: [

src/app.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { Router } from "@solidjs/router";
22
import { FileRoutes } from "@solidjs/start/router";
3-
import { ColorModeProvider, ColorModeScript, createLocalStorageManager } from "@kobalte/core";
3+
import {
4+
ColorModeProvider,
5+
ColorModeScript,
6+
createLocalStorageManager,
7+
} from "@kobalte/core";
48
import { Suspense, Show } from "solid-js";
59

610
import "./app.css";
@@ -16,16 +20,21 @@ export default function App() {
1620

1721
return (
1822
<Router
23+
base={import.meta.env.SERVER_BASE_URL}
1924
root={(props) => (
20-
<Show when={ENABLE_COLOR_MODE} fallback={<Suspense>{props.children}</Suspense>}>
25+
<Show
26+
when={ENABLE_COLOR_MODE}
27+
fallback={<Suspense>{props.children}</Suspense>}
28+
>
2129
<>
2230
<ColorModeScript storageType={storageManager.type} />
2331
<ColorModeProvider storageManager={storageManager}>
2432
<Suspense>{props.children}</Suspense>
2533
</ColorModeProvider>
2634
</>
2735
</Show>
28-
)}>
36+
)}
37+
>
2938
<FileRoutes />
3039
</Router>
3140
);

0 commit comments

Comments
 (0)