Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update document config #480

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/document-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,14 @@ jobs:
BUILD_SCRIPT: cd document && yarn && yarn docs:build
BUILD_DIR: docs/.vuepress/dist/
CNAME: cosid.ahoo.me

- name: Build and Deploy With Site Base
uses: jenkey2011/vuepress-deploy@master
env:
SITE_BASE: /cosid/
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
TARGET_REPO: Ahoo-Wang/CosId
TARGET_BRANCH: gh-pages-with-site-base
BUILD_SCRIPT: cd document && yarn && yarn docs:build
BUILD_DIR: docs/.vuepress/dist/
CNAME: cosid.ahoo.me
8 changes: 6 additions & 2 deletions document/docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ import {
NavItemsZH, SidebarZH
} from './config/index'

const siteBase: `/${string}/` = process.env.SITE_BASE || "/"

console.log('Configured SiteBase is:' + siteBase)

const GM_ID = 'G-SP6EEGK56L'

export default defineConfig(ctx => ({
base: '',
head: [
['link', {rel: 'icon', href: `/favicon.ico`}],
[
Expand Down Expand Up @@ -84,5 +87,6 @@ export default defineConfig(ctx => ({
['vuepress-plugin-flowchart']
],
extraWatchFiles: ['.vuepress/config/**'],
evergreen: !ctx.isProd
evergreen: !ctx.isProd,
base: siteBase
}));
Loading