Skip to content

Commit

Permalink
build: add deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
tolerance-go authored and yarnbai committed Apr 9, 2024
1 parent 7e053ad commit fe19941
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Deploy Documentation

on:
push:
branches:
- master # 当向master分支push时触发

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16' # 可以根据你的项目需求选择Node.js的版本

- name: Install Yarn # 这一步是可选的,根据需要决定是否包含
run: npm install -g yarn

- name: Install Dependencies
run: yarn install # 使用yarn安装依赖

- name: Build Docs
run: npm run docs:build # 构建文档

- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages # 部署到gh-pages分支
folder: docs-dist # 指定构建产物目录

0 comments on commit fe19941

Please sign in to comment.