-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
9,633 additions
and
13,436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,55 @@ | ||
name: Build and Deploy | ||
name: 部署文档 | ||
|
||
on: | ||
push: | ||
branches: | ||
# 确保这是你正在使用的分支名称 | ||
- master | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build-and-deploy: | ||
deploy-gh-pages: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: docs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
node-version: 16 | ||
fetch-depth: 0 | ||
# 如果你文档需要 Git 子模块,取消注释下一行 | ||
# submodules: true | ||
|
||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Install and Build | ||
run: | | ||
npm ci | ||
npm run build | ||
working-directory: docs | ||
|
||
- name: vuepress-deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
|
||
- name: 安装 pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: | | ||
- cwd: docs | ||
- name: 设置 Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
cache-dependency-path: 'docs/pnpm-lock.yaml' | ||
|
||
|
||
- name: 构建文档 | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=8192 | ||
run: |- | ||
pnpm run docs:build | ||
> src/.vuepress/dist/.nojekyll | ||
- name: 部署文档 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
personal_token: ${{ secrets.ACCESS_TOKEN }} | ||
external_repository: HScarb/HScarb.github.io | ||
publish_branch: master | ||
publish_dir: docs/src/.vuepress/dist | ||
# 这是文档部署到的分支名称 | ||
branch: gh-pages | ||
folder: src/.vuepress/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
venv/ | ||
|
||
*/.temp | ||
*/.cache | ||
*/node_modules | ||
*/dist/ | ||
/docs/src/.vuepress/dist/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.