Skip to content

Commit

Permalink
doc: update document config (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang authored Nov 9, 2023
1 parent e053a8c commit db56ed8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
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
}));

0 comments on commit db56ed8

Please sign in to comment.