Skip to content

Commit eaaf0f3

Browse files
committed
remove github pages deploy
1 parent af9d4d4 commit eaaf0f3

4 files changed

Lines changed: 33 additions & 63 deletions

File tree

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Node.js Pipeline
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
name: Build
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v6
19+
20+
- name: Use Node.js
21+
uses: actions/setup-node@v6
22+
23+
- run: npm ci
24+
- run: npm run fetch-wasm
25+
- run: npm run build --if-present

.github/workflows/deploy.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

src/router.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router';
1+
import { createRouter, createWebHistory } from 'vue-router';
22
import CalendarView from '@/views/CalendarView.vue';
33
import SettingsView from '@/views/SettingsView.vue';
44
import FileExplorer from '@/views/FileExplorer.vue';
55
import { settings } from '@/services/settings';
66

7-
const isGitHubPages = import.meta.env.VITE_GITHUB_PAGES == 'true'; // needs to have VITE_ prefix
8-
97
const router = createRouter({
10-
// localy, we use classic sexy /settings, but on gh pages, that will result in 404 so we need to use hash router
11-
history: isGitHubPages ? createWebHashHistory(import.meta.env.BASE_URL) : createWebHistory(import.meta.env.BASE_URL),
8+
history: createWebHistory(import.meta.env.BASE_URL),
129
routes: [
1310
{
1411
name: 'calendar',

vite.config.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ import { VitePWA } from 'vite-plugin-pwa';
88
import { resolve } from 'node:path';
99
import { statSync } from 'node:fs';
1010

11-
const base = process.env.GITHUB_PAGES == 'true' ? '/web-client/' : '/';
12-
1311
const wasmPath = resolve(__dirname, 'src/assets/core.wasm');
1412
const wasmDecodedSize = statSync(wasmPath).size;
1513

1614
// https://vite.dev/config/
1715
export default defineConfig({
18-
base,
1916
plugins: [
2017
vue(),
2118
// compress wasm files to brotli, zstd and gzip
@@ -40,22 +37,22 @@ export default defineConfig({
4037
manifest: {
4138
name: 'Git Calendar Web',
4239
short_name: 'Git Cal',
43-
id: base,
44-
start_url: base,
45-
scope: base,
40+
id: '/',
41+
start_url: '/',
42+
scope: '/',
4643
description: 'A web client for a Git-backed calendar.',
4744
display: 'standalone',
4845
background_color: '#ffffff',
4946
theme_color: '#ffffff',
5047
orientation: 'portrait-primary',
5148
icons: [
5249
{
53-
src: `${base}icon-192.png`,
50+
src: '/icon-192.png',
5451
sizes: '192x192',
5552
type: 'image/png',
5653
},
5754
{
58-
src: `${base}icon-512.png`,
55+
src: '/icon-512.png',
5956
sizes: '512x512',
6057
type: 'image/png',
6158
},
@@ -68,7 +65,7 @@ export default defineConfig({
6865
globPatterns: ['**/*.{js,css,html,ico,png,svg,webp,woff2,wasm,zst,br,gz}'],
6966
maximumFileSizeToCacheInBytes: 25 * 1024 * 1024, // 25MiB (core.wasm is a big boy)
7067
cleanupOutdatedCaches: true,
71-
navigateFallback: `${base}index.html`,
68+
navigateFallback: '/index.html',
7269
},
7370
}),
7471
],

0 commit comments

Comments
 (0)