Skip to content

Commit 46e0ac0

Browse files
committed
fix baseUrl
1 parent 7fa23ce commit 46e0ac0

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

.github/workflows/deploy-server.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ jobs:
5151
- name: Prebuild with VitePress
5252
run: pnpm run prebuild # or pnpm docs:build / yarn docs:build / bun run docs:build
5353
- name: Build with VitePress
54-
run: pnpm run build # or pnpm docs:build / yarn docs:build / bun run docs:build
54+
run: pnpm run build:server # or pnpm docs:build / yarn docs:build / bun run docs:build
5555

5656
- name: Upload using rsync
5757
run: |
58-
mkdir .ssh/; echo ${{ secrets.RSYNC_PASSWORD }} > .ssh/id_ed25519
59-
ssh-keyscan -H ${{ secrets.RSYNC_HOST }} >> .ssh/known_hosts
58+
mkdir .ssh/;
59+
echo "${{ secrets.RSYNC_PASSWORD }}" > .ssh/id_ed25519;
60+
ssh-keyscan -H "${{ secrets.RSYNC_HOST }}" > .ssh/known_hosts;
6061
rsync -va --rsh="ssh -i .ssh/id_ed25519" docs/.vitepress/dist ${{ secrets.RSYNC_USER }}@${{ secrets.RSYNC_HOST }}:/home/${{ secrets.RSYNC_USER }}/site

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ name: Deploy VitePress site to Pages
55
on:
66
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
77
# using the `master` branch as the default branch.
8-
push:
9-
branches: [main]
8+
# push:
9+
# branches: [main]
1010

1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:

docs/.vitepress/config.mts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { createContentLoader, defineConfig, type DefaultTheme } from 'vitepress'
22
import { generateSidebarItems, getFiles } from './sidebar'
33

4-
const isBuild = process.env.NODE_ENV === 'production'
5-
const baseUrl = isBuild && '/libremesh.github.io' || ''
4+
// const isBuild = process.env.NODE_ENV === 'production'
5+
const isFork = process.env.IS_FORK === '1'
6+
const baseUrl = isFork && '/libremesh.github.io' || ''
67

78
const libremesh = {
89
stable_version: '2024.1',

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"scripts": {
1010
"dev": "vitepress dev docs",
1111
"prebuild": "node prepare_data.js",
12-
"build": "NODE_ENV=production vitepress build docs",
12+
"build": "NODE_ENV=production IS_FORK=1 vitepress build docs",
13+
"build:server": "NODE_ENV=production vitepress build docs",
1314
"preview": "vitepress preview docs"
1415
},
1516
"dependencies": {

0 commit comments

Comments
 (0)