Skip to content

Commit 25cbfd0

Browse files
authored
Merge pull request #35 from ssciwr/deploy-site-to-pages
fix: correct upload folder for artefacts
2 parents 9af1ddb + 00e1b4d commit 25cbfd0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121
cancel-in-progress: true
2222

2323
jobs:
24-
build-and-deploy-pages:
24+
build-and-deploy-pages:
2525
runs-on: ubuntu-latest
2626
environment:
2727
name: github-pages
@@ -47,13 +47,15 @@ jobs:
4747
run: pnpm install --frozen-lockfile
4848
- name: Build
4949
run: pnpm build
50+
env:
51+
NODE_ENV: production
5052
- name: Setup Pages
5153
uses: actions/configure-pages@v5
5254
- name: Upload artifact
5355
uses: actions/upload-pages-artifact@v3
5456
with:
5557
# Upload dist folder
56-
path: './dist'
58+
path: './frontend/dist'
5759
- name: Deploy to GitHub Pages
5860
id: deployment
5961
uses: actions/deploy-pages@v4

frontend/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { defineConfig } from "vite";
44
// https://vite.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7+
base: process.env.NODE_ENV === "production" ? "/mock-mapping-frontend/" : "/",
78
server: {
89
hmr: true, // Automatically refresh/reload the page behind the scenes to reflect code changes.
910
},

0 commit comments

Comments
 (0)