Skip to content

Commit ad39cc4

Browse files
committed
github deploy fix
1 parent b7e6c1e commit ad39cc4

4 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/static.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
cd solid-watchparty/
4040
npm install
4141
npm run build
42+
npm run github-post-build
4243
4344
- name: Upload Build Artifact
4445
uses: actions/upload-artifact@v3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
documentation/
22
dist/
3+
.idea
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import viteConfig from "./vite.config.js";
2+
import * as fs from "fs";
3+
4+
// TODO: possibly get these from App.jsx
5+
const routes = [
6+
"/menu",
7+
"/watch"
8+
];
9+
const dir = "./src/" + viteConfig.build.outDir;
10+
11+
for (const route of routes) {
12+
fs.cpSync(dir + "/index.html", dir + route + "/index.html");
13+
}

solid-watchparty/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "vite build",
9+
"github-post-build": "node github-post-build-script.js",
910
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
1011
"preview": "vite preview"
1112
},

0 commit comments

Comments
 (0)