Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyh2001 committed Jul 30, 2023
1 parent ecdfd5d commit f7cea9f
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1 @@
name: Deploy Docs to GitHub Pages

on:
push:
branches:
- master # 更换为您的主要分支名称,如果您使用的是其他主要分支,请相应修改

jobs:
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: '14' # 可根据您的项目需要修改Node.js版本

steps:
# 下载仓库代码 / 校验
- name: Checkout
# actions/checkout@v3 是 github 官方的一个action,用于 clone 该仓库的源码到工作流中
uses: actions/checkout@v3

# 安装 pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7.17.1

# 安装 node
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'pnpm'

- name: Install dependencies
run: pnpm i # 执行安装依赖,如果您的项目中使用的是 npm,请将 "pnpm i" 替换为 "npm install"

- name: Build Docs
run: pnpm run build:docs # 执行打包文档命令,如果您的项目中使用的是 npm,请将 "pnpm run build:docs" 替换为 "npm run build:docs"

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # 访问秘钥
publish_branch: gh-pages # 推送分支
publish_dir: docs/.vitepress/dist # 指定打包后的文档目录

0 comments on commit f7cea9f

Please sign in to comment.