调整自动化部署流程 #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy GitHub Pages | |
permissions: | |
contents: write | |
# 触发条件:在 push 到 master 分支后 | |
on: | |
push: | |
tags: | |
- '*' | |
# 任务 | |
jobs: | |
build-and-deploy: | |
# 服务器环境:最新版 Ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
# 拉取代码 | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
submodules: false | |
# 1、生成静态文件 | |
- name: Build | |
run: yarn && yarn workspace frontend build | |
# - name: Build component | |
# run: yarn workspace frontend build-components | |
# 2、部署到 gh-pages 分支 | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./apps/frontend/dist |