Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ jobs:
with:
node-version: 20.x

- name: Install and Build 🔧
run: |
- name: Install Dependencies 🔧
run:
yarn install

- name: Build 🔧
run:
yarn run build

- name: Post Build Actions 🛠️
run:
yarn run github-post-build
env:
NODE_ENV: production
Expand Down
11 changes: 6 additions & 5 deletions github-post-build-script.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cpSync } from 'fs';
import vueConfig from './vite.config.js';
import { cpSync, mkdirSync } from 'fs';
import { join } from 'path';

const routes = [
"/home",
Expand All @@ -10,8 +10,9 @@ const routes = [
"/privacy",
];

const dir = vueConfig.build.outDir;
console.log(dir)
const dir = 'dist';
for (const route of routes) {
cpSync(dir + "/index.html", dir + route + "/index.html");
const target = join(dir, route);
mkdirSync(target, { recursive: true });
cpSync(join(dir, 'index.html'), join(target, 'index.html'));
}
1 change: 0 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default defineConfig(({ command }) => {
},
},
base: isDev ? "./" : "/solid-cockpit/",
transpileDependencies: true,
build: {
outDir: "dist",
},
Expand Down
Loading