mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2025-01-18 08:41:41 +03:00
Remove double build (#563)
* Remove double build The docs are currently built twice, and as a result the docs also appear on https://xtls.github.io/Xray-docs-next/ This doesn't seem necessary and the gh-pages branch of this repo can be deleted. The real gh-pages branch is here: https://github.com/XTLS/XTLS.github.io/tree/gh-pages-next Deleting the gh-pages from this repo will also make clones faster * accidentally removed install step
This commit is contained in:
parent
afde8ebc06
commit
36d51983c7
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@ -31,22 +31,10 @@ jobs:
|
|||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
- name: Install and Build
|
- name: Install
|
||||||
env:
|
run: pnpm install
|
||||||
XRAY_DOCS_USE_VITE: "true"
|
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
||||||
run: |
|
|
||||||
pnpm install
|
|
||||||
yarn docs:build
|
|
||||||
- name: Deploy
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: docs/.vuepress/dist
|
|
||||||
- name: Build for Main Repository
|
- name: Build for Main Repository
|
||||||
env:
|
env:
|
||||||
XRAY_DOCS_MAIN_REPO: "true"
|
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096 --openssl-legacy-provider"
|
NODE_OPTIONS: "--max_old_space_size=4096 --openssl-legacy-provider"
|
||||||
run: |
|
run: |
|
||||||
yarn docs:build
|
yarn docs:build
|
||||||
|
@ -15,10 +15,8 @@ import i18nPlugin from "vuepress-plugin-i18n";
|
|||||||
const __dirname = getDirname(import.meta.url)
|
const __dirname = getDirname(import.meta.url)
|
||||||
console.log('>>> __dirname -> ', __dirname)
|
console.log('>>> __dirname -> ', __dirname)
|
||||||
const isProduction = process.env.NODE_ENV === "production";
|
const isProduction = process.env.NODE_ENV === "production";
|
||||||
const forMainRepo = process.env.XRAY_DOCS_MAIN_REPO === "true";
|
|
||||||
const useVite = process.env.XRAY_DOCS_USE_VITE === "true";
|
const useVite = process.env.XRAY_DOCS_USE_VITE === "true";
|
||||||
|
|
||||||
console.log("base:", forMainRepo ? "/" : "/Xray-docs-next/");
|
|
||||||
console.log(
|
console.log(
|
||||||
"bundler:",
|
"bundler:",
|
||||||
isProduction && !useVite ? "@vuepress/webpack" : "@vuepress/vite"
|
isProduction && !useVite ? "@vuepress/webpack" : "@vuepress/vite"
|
||||||
@ -52,7 +50,7 @@ export default defineUserConfig(<UserConfig>{
|
|||||||
componentsDir: path.resolve(__dirname, './theme/components'),
|
componentsDir: path.resolve(__dirname, './theme/components'),
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
base: forMainRepo ? "/" : "/Xray-docs-next/",
|
base: "/",
|
||||||
locales: {
|
locales: {
|
||||||
"/": {
|
"/": {
|
||||||
lang: "zh-CN",
|
lang: "zh-CN",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user