Skip to content

Commit bcf1a1b

Browse files
committed
Preparing for publishing
1 parent fd247ea commit bcf1a1b

4 files changed

Lines changed: 46 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: CI
33
on:
44
push:
55
branches: [ main ]
6+
workflow_dispatch: # allow manual start
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
612

713
concurrency:
814
group: ${{ github.workflow }}
@@ -21,5 +27,10 @@ jobs:
2127
with:
2228
node-version: 24
2329

24-
- working-directory: frontend
25-
run: npm i && npm run build
30+
- name: Install dependencies
31+
working-directory: frontend
32+
run: npm ci
33+
34+
- name: Build
35+
working-directory: frontend
36+
run: npm run build

frontend/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
VITE_BASE_PATH=/OpenNumismatWeb/
12
VITE_APP_VERSION=$npm_package_version

frontend/dist/.nojekyll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="UTF-8">
5+
<link rel="icon" href="/favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>OpenNumismat</title>
8+
<script type="module" crossorigin src="/assets/index-jkF8kpuq.js"></script>
9+
<link rel="stylesheet" crossorigin href="/assets/index-BSzkkGLB.css">
10+
</head>
11+
<body>
12+
<div id="app"></div>
13+
</body>
14+
</html>

frontend/vite.config.js

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
import { fileURLToPath, URL } from 'node:url'
22

3-
import { defineConfig } from 'vite'
3+
import { defineConfig, loadEnv } from 'vite'
44
import vue from '@vitejs/plugin-vue'
5-
import vueDevTools from 'vite-plugin-vue-devtools'
65

76
// https://vite.dev/config/
8-
export default defineConfig({
9-
plugins: [
10-
vue(),
11-
vueDevTools(),
12-
],
13-
resolve: {
14-
alias: {
15-
'@': fileURLToPath(new URL('./src', import.meta.url))
7+
export default defineConfig(({ mode }) => {
8+
const env = loadEnv(mode, process.cwd(), '')
9+
return {
10+
base: env.VITE_BASE_PATH || '/',
11+
plugins: [
12+
vue(),
13+
],
14+
resolve: {
15+
alias: {
16+
'@': fileURLToPath(new URL('./src', import.meta.url))
17+
},
1618
},
17-
},
18-
server: {
19-
headers: {
20-
'Cross-Origin-Opener-Policy': 'same-origin',
21-
'Cross-Origin-Embedder-Policy': 'require-corp',
19+
server: {
20+
headers: {
21+
'Cross-Origin-Opener-Policy': 'same-origin',
22+
'Cross-Origin-Embedder-Policy': 'require-corp',
23+
},
2224
},
23-
},
25+
}
2426
})

0 commit comments

Comments
 (0)