mirror of
https://github.com/snowykami/mbcp.git
synced 2024-11-25 07:45:03 +08:00
📝 测试文档部署
This commit is contained in:
parent
f343b54051
commit
dfdce1fd6f
57
.github/workflows/deploy-docs.yml
vendored
57
.github/workflows/deploy-docs.yml
vendored
@ -44,39 +44,28 @@ jobs:
|
|||||||
python -m pip install pydantic
|
python -m pip install pydantic
|
||||||
python docs/mkdoc.py
|
python docs/mkdoc.py
|
||||||
|
|
||||||
- name: Setup Node
|
- name: 安装 pnpm
|
||||||
uses: actions/setup-node@v4
|
uses: pnpm/action-setup@v2
|
||||||
run: |-
|
|
||||||
cd docs
|
|
||||||
npm install
|
|
||||||
|
|
||||||
- name: Setup Pages
|
|
||||||
uses: actions/configure-pages@v4
|
|
||||||
|
|
||||||
- name: Install node dependencies
|
|
||||||
run: |-
|
|
||||||
cd docs
|
|
||||||
npm ci
|
|
||||||
|
|
||||||
- name: Build with VitePress
|
|
||||||
run: |-
|
|
||||||
cd docs
|
|
||||||
npm run docs:build # 或 pnpm docs:build / yarn docs:build / bun run docs:build
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-pages-artifact@v3
|
|
||||||
with:
|
with:
|
||||||
path: docs/.vitepress/dist
|
run_install: true
|
||||||
|
version: 8
|
||||||
|
|
||||||
# 部署工作
|
- name: 设置 Node.js
|
||||||
deploy:
|
run: |-
|
||||||
environment:
|
cd docs
|
||||||
name: github-pages
|
pnpm install
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
needs: build
|
- name: 构建文档
|
||||||
runs-on: ubuntu-latest
|
env:
|
||||||
name: Deploy
|
NODE_OPTIONS: --max_old_space_size=8192
|
||||||
steps:
|
run: |-
|
||||||
- name: Deploy to GitHub Pages
|
cd docs
|
||||||
id: deployment
|
pnpm run docs:build
|
||||||
uses: actions/deploy-pages@v4
|
> .vuepress/dist/.nojekyll
|
||||||
|
|
||||||
|
- name: 部署文档
|
||||||
|
uses: JamesIves/github-pages-deploy-action@v4
|
||||||
|
with:
|
||||||
|
# 这是文档部署到的分支名称
|
||||||
|
branch: gh-pages
|
||||||
|
folder: docs/.vuepress/dist
|
Loading…
Reference in New Issue
Block a user