Skip to content

Commit 0979d98

Browse files
committed
build: update release workflows
1 parent 818fb9c commit 0979d98

File tree

2 files changed

+35
-39
lines changed

2 files changed

+35
-39
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
with:
2424
token: ${{ secrets.GITHUB_TOKEN }}
2525
release-type: node
26+
target-branch: master
2627

2728
publish:
2829
name: Publish to NPM
@@ -57,3 +58,37 @@ jobs:
5758
run: pnpm publish ./build --access public --no-git-checks
5859
env:
5960
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
61+
62+
docs:
63+
name: Build & Deploy Docs
64+
runs-on: ubuntu-latest
65+
needs: publish
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v4
69+
with:
70+
fetch-depth: 0
71+
72+
- name: Setup Node.js
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version: '20.x'
76+
77+
- name: Install pnpm
78+
uses: pnpm/action-setup@v4
79+
with:
80+
version: latest
81+
82+
- name: Install dependencies
83+
run: |
84+
pnpm install --frozen-lockfile
85+
cd docs && pnpm install --frozen-lockfile
86+
87+
- name: Build Docs
88+
run: pnpm docs:build
89+
90+
- name: Deploy to GitHub Pages
91+
uses: peaceiris/actions-gh-pages@v4
92+
with:
93+
github_token: ${{ secrets.GITHUB_TOKEN }}
94+
publish_dir: ./docs/build

0 commit comments

Comments
 (0)