Skip to content

Commit

Permalink
feat: 测试 CD 场景
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyi2 committed Oct 19, 2023
1 parent 1ca8a51 commit 4be0ae0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,30 @@ jobs:
- name: 单元测试
run: npm test

# - name: 测试报告
# uses: coverallsapp/github-action@v2
- name: 测试报告
uses: coverallsapp/github-action@v2

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

# 如果代码构建失败,则不需要进行文档部署
- name: 代码构建
run: npm run build

# 部署文档
# - name: 部署文档
# uses: peaceiris/actions-gh-pages@v3
# with:
# # GTIHUB_TOKEN:https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
# # Github 会在 workflow 中自动生成 GIHUBT_TOKEN,用于认证 workflow 的运行
# github_token: ${{ secrets.GITHUB_TOKEN }}
# # 执行 npm run docs 命令后默认会在该目录下生成静态资源
# publish_dir: ./docs/.vuepress/dist
# # 默认发布到 gh-pages 分支上,可以指定特定的发布分支
# # publish_branch: gh-pages1
# # https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-set-custom-commit-message
# # 设置上传到 gs-pages 分支的 commit 信息
# full_commit_message: ${{ github.event.head_commit.message }}
- name: 部署文档
uses: peaceiris/actions-gh-pages@v3
with:
# GTIHUB_TOKEN:https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
# Github 会在 workflow 中自动生成 GIHUBT_TOKEN,用于认证 workflow 的运行
github_token: ${{ secrets.GITHUB_TOKEN }}
# 执行 npm run docs 命令后默认会在该目录下生成静态资源
publish_dir: ./docs/.vuepress/dist
# 默认发布到 gh-pages 分支上,可以指定特定的发布分支
# publish_branch: gh-pages1
# https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-set-custom-commit-message
# 设置上传到 gs-pages 分支的 commit 信息
full_commit_message: ${{ github.event.head_commit.message }}

# 基于构建的代码进行版本发布
# cat $NPM_CONFIG_USERCONFIG 用于查看 CD 服务器上的 .npmrc 文件的内容
Expand Down

0 comments on commit 4be0ae0

Please sign in to comment.