mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
ci: deploy docs to github-pages branch (#181)
This commit is contained in:
parent
0f1ffc7532
commit
5f0dd0dfa2
42
.github/workflows/docs-deploy.yml
vendored
Normal file
42
.github/workflows/docs-deploy.yml
vendored
Normal 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
|
||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@ -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
|
||||
|
||||
@ -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"
|
||||
Loading…
x
Reference in New Issue
Block a user