File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ concurrency :
14+ group : pages
15+ cancel-in-progress : true
16+
17+ jobs :
18+ build :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v4
22+ - uses : actions/setup-node@v4
23+ with :
24+ node-version : ' lts/*'
25+ cache : npm
26+ - run : npm ci
27+ - run : npm run build
28+ - uses : actions/upload-pages-artifact@v3
29+ with :
30+ path : dist
31+
32+ deploy :
33+ needs : build
34+ runs-on : ubuntu-latest
35+ environment :
36+ name : github-pages
37+ url : ${{ steps.deployment.outputs.page_url }}
38+ steps :
39+ - id : deployment
40+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1+ {
2+ "semi": true,
3+ "singleQuote": true,
4+ "tabWidth": 2,
5+ "trailingComma": "none",
6+ "printWidth": 100
7+ }
Original file line number Diff line number Diff line change 11<!doctype html>
22< html lang ="en ">
3- < head >
4- < meta charset ="utf-8 " />
5- < title > OpenSeadragon</ title >
6- < script >
7- // GitHub Pages SPA redirect: store the full URL and bounce to the base path.
8- // The main index.html restores the path via history.replaceState on load.
9- var base = '/new-website/' ;
10- var path = location . pathname . slice ( base . length - 1 ) + location . search + location . hash ;
11- sessionStorage . setItem ( 'osd_spa_redirect' , path ) ;
12- location . replace ( base ) ;
13- </ script >
14- </ head >
15- < body > </ body >
3+ < head >
4+ < meta charset ="utf-8 " />
5+ < title > OpenSeadragon</ title >
6+ < script >
7+ // GitHub Pages SPA redirect: store the full URL and bounce to the base path.
8+ // The main index.html restores the path via history.replaceState on load.
9+ // NOTE: This base path must match the base path in vite.config.js and the name of the repository.
10+ var base = '/website/' ;
11+ var path = location . pathname . slice ( base . length - 1 ) + location . search + location . hash ;
12+ sessionStorage . setItem ( 'osd_spa_redirect' , path ) ;
13+ location . replace ( base ) ;
14+ </ script >
15+ </ head >
16+ < body > </ body >
1617</ html >
Original file line number Diff line number Diff line change 1- import { defineConfig } from 'vite'
2- import vue from '@vitejs/plugin-vue'
3- import { fileURLToPath , URL } from 'node:url'
1+ import { defineConfig } from 'vite' ;
2+ import vue from '@vitejs/plugin-vue' ;
3+ import { fileURLToPath , URL } from 'node:url' ;
44
55export default defineConfig ( {
66 plugins : [ vue ( ) ] ,
7- base : '/new-website/' ,
7+ // NOTE: This base path must match the base path in 404.html and the name of the repository.
8+ base : '/website/' ,
89 resolve : {
910 alias : {
1011 '@' : fileURLToPath ( new URL ( './src' , import . meta. url ) )
1112 }
1213 }
13- } )
14+ } ) ;
You can’t perform that action at this time.
0 commit comments