Skip to content

docs: 📝 update docs #156

docs: 📝 update docs

docs: 📝 update docs #156

Workflow file for this run

# 1. 为工作流定义名字
name: 「GitHub Pages」Build & Deploy
# 2. 触发条件修改为: 当 main 或 master 分支, 有 push 的时候, 执行任务
on:
push:
branches:
# - master
- release-admin
# 3. 创建工作流
jobs:
build: # 工作流名称
runs-on: ubuntu-latest # 依赖环境
steps: # 工作流步骤
# step 1. 获取源码, 拉取仓库代码
- name: Chekcout 🛎️ # 步骤名
uses: actions/checkout@master # 使用插件 => https://github.com/actions/checkout
- name: Install pnpm
uses: pnpm/[email protected]
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: Install dependencies
shell: bash
run: pnpm install
# step 3. 安装依赖并打包
- name: Install and Build 🔧
run: |
pnpm config set registry https://registry.npmmirror.com
pnpm build:admin
# step 4. 项目部署, 将打包后的产物合并到指定的分支上
- name: Deploy 🚀 # 步骤名
uses: JamesIves/[email protected] # 使用插件 => https://github.com/JamesIves/github-pages-deploy-action
with:
BRANCH: gh-pages # 部署分支
FOLDER: gbeata-admin # 打包, 静态资源输出的目录
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PACKAGE }}
run: |
cd ./apps/admin
npx semantic-release