From 5f34e69bf77d98098f618475398abfe59c7c0b5d Mon Sep 17 00:00:00 2001 From: smessie Date: Tue, 10 Oct 2023 16:59:51 +0200 Subject: [PATCH] ci: Configure subdir of GH pages --- .github/workflows/deploy.yml | 2 ++ package-lock.json | 53 ++++++++++++++++++++++++++++++------ package.json | 1 - src/main.ts | 2 +- tsconfig.app.json | 3 +- 5 files changed, 50 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2687b7a..1dad0b1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,6 +7,8 @@ on: pull_request: {} permissions: contents: write +env: + SUBDIR: /scholarly-browser/ jobs: build-and-deploy: runs-on: ubuntu-latest diff --git a/package-lock.json b/package-lock.json index 579432d..13faa51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,6 @@ "devDependencies": { "@rushstack/eslint-patch": "^1.3.2", "@tsconfig/node18": "^18.2.0", - "@types/node": "^18.17.5", "@vitejs/plugin-vue": "^4.3.1", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^11.0.3", @@ -2875,9 +2874,12 @@ } }, "node_modules/@types/node": { - "version": "18.17.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.12.tgz", - "integrity": "sha512-d6xjC9fJ/nSnfDeU0AMDsaJyb1iHsqCSOdi84w4u+SlN/UgQdY5tRhpMzaFYsI4mnpvgTivEaQd0yOUhAtOnEQ==" + "version": "20.8.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.4.tgz", + "integrity": "sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A==", + "dependencies": { + "undici-types": "~5.25.1" + } }, "node_modules/@types/readable-stream": { "version": "2.3.15", @@ -3791,6 +3793,11 @@ "node": ">=8.0" } }, + "node_modules/componentsjs/node_modules/@types/node": { + "version": "18.18.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.4.tgz", + "integrity": "sha512-t3rNFBgJRugIhackit2mVcLfF6IRc0JE4oeizPQL8Zrm8n2WY/0wOdpOPhdtG0V9Q2TlW/axbF1MJ6z+Yj/kKQ==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -5484,6 +5491,11 @@ "jsonld-context-parse": "bin/jsonld-context-parse.js" } }, + "node_modules/jsonld-context-parser/node_modules/@types/node": { + "version": "18.18.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.4.tgz", + "integrity": "sha512-t3rNFBgJRugIhackit2mVcLfF6IRc0JE4oeizPQL8Zrm8n2WY/0wOdpOPhdtG0V9Q2TlW/axbF1MJ6z+Yj/kKQ==" + }, "node_modules/jsonld-context-parser/node_modules/canonicalize": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-1.0.8.tgz", @@ -7572,6 +7584,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + }, "node_modules/untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", @@ -10572,9 +10589,12 @@ } }, "@types/node": { - "version": "18.17.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.12.tgz", - "integrity": "sha512-d6xjC9fJ/nSnfDeU0AMDsaJyb1iHsqCSOdi84w4u+SlN/UgQdY5tRhpMzaFYsI4mnpvgTivEaQd0yOUhAtOnEQ==" + "version": "20.8.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.4.tgz", + "integrity": "sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A==", + "requires": { + "undici-types": "~5.25.1" + } }, "@types/readable-stream": { "version": "2.3.15", @@ -11028,7 +11048,7 @@ }, "artifact-explorer": { "version": "git+ssh://git@github.com/MellonScholarlyCommunication/artifact-explorer.git#b117a410861ebc8ad6ebc6b6bf722029e7765a35", - "from": "artifact-explorer@git+ssh://git@github.com:MellonScholarlyCommunication/artifact-explorer.git", + "from": "artifact-explorer@github:MellonScholarlyCommunication/artifact-explorer", "requires": { "@comunica/query-sparql": "^2.9.0" } @@ -11246,6 +11266,13 @@ "rdf-terms": "^1.7.0", "semver": "^7.3.2", "winston": "^3.3.3" + }, + "dependencies": { + "@types/node": { + "version": "18.18.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.4.tgz", + "integrity": "sha512-t3rNFBgJRugIhackit2mVcLfF6IRc0JE4oeizPQL8Zrm8n2WY/0wOdpOPhdtG0V9Q2TlW/axbF1MJ6z+Yj/kKQ==" + } } }, "concat-map": { @@ -12456,6 +12483,11 @@ "relative-to-absolute-iri": "^1.0.5" }, "dependencies": { + "@types/node": { + "version": "18.18.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.4.tgz", + "integrity": "sha512-t3rNFBgJRugIhackit2mVcLfF6IRc0JE4oeizPQL8Zrm8n2WY/0wOdpOPhdtG0V9Q2TlW/axbF1MJ6z+Yj/kKQ==" + }, "canonicalize": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-1.0.8.tgz", @@ -14029,6 +14061,11 @@ "which-boxed-primitive": "^1.0.2" } }, + "undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + }, "untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", diff --git a/package.json b/package.json index ec053f7..304c261 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "devDependencies": { "@rushstack/eslint-patch": "^1.3.2", "@tsconfig/node18": "^18.2.0", - "@types/node": "^18.17.5", "@vitejs/plugin-vue": "^4.3.1", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^11.0.3", diff --git a/src/main.ts b/src/main.ts index b4c0201..978360c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,7 +6,7 @@ import * as VueRouter from "vue-router"; const router = VueRouter.createRouter({ - history: VueRouter.createWebHistory(), + history: VueRouter.createWebHistory(process.env.NODE_ENV === "production" ? "/scholarly-browser/" : "/"), routes: [{path: "/", component: App, props: true}], }); diff --git a/tsconfig.app.json b/tsconfig.app.json index 3e5b621..3934d9b 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -7,6 +7,7 @@ "baseUrl": ".", "paths": { "@/*": ["./src/*"] - } + }, + "types": ["node"] } }