Skip to content

Commit

Permalink
Update to vuepress 2
Browse files Browse the repository at this point in the history
  • Loading branch information
HScarb committed Aug 6, 2023
1 parent 4be565d commit bf28301
Show file tree
Hide file tree
Showing 46 changed files with 9,729 additions and 13,413 deletions.
61 changes: 41 additions & 20 deletions .github/workflows/vuepress-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,52 @@
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:
run_install: true


- name: 设置 Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm


- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
venv/

*/.temp
*/.cache
*/node_modules
*/dist/
/docs/src/.vuepress/dist/
Expand Down
Loading

0 comments on commit bf28301

Please sign in to comment.