-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 976 Bytes
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: 发布和部署
on:
push:
branches:
- main
jobs:
release-and-deploy:
name: 发布和部署
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: 设置 pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 构建静态页面并部署
run: pnpm run build-example-page
- name: 部署到 GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist-example-page
- name: 发布
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm semantic-release