ci: deploy docs to github-pages branch (#181)

This commit is contained in:
pengzhanbo 2024-09-16 00:48:26 +08:00 committed by GitHub
parent 0f1ffc7532
commit 5f0dd0dfa2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 43 additions and 11 deletions

42
.github/workflows/docs-deploy.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Deploy Docs
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Build Packages
run: pnpm build:package
- name: Docs build
env:
NODE_OPTIONS: --max_old_space_size=8192
run: pnpm docs:build
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/.vuepress/dist
single-commit: true

View File

@ -6,8 +6,7 @@ on:
- v*
jobs:
release:
if: github.repository == 'pengzhanbo/vuepress-theme-plume'
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

View File

@ -1,9 +0,0 @@
# prevent Netlify npm install
[build]
publish = "docs/.vuepress/dist"
command = "pnpm build:package && pnpm docs:build"
[build.environment]
NODE_VERSION = "18"
NPM_FLAGS = "--version"