fix: 实时日志增加暂停以及清空 #55
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
# 将静态内容部署到 GitHub Pages 的简易工作流程 | |
name: Deploy static content to Pages | |
on: | |
push: | |
branches: | |
- web | |
# 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages。 | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# 允许一个并发的部署 | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.10.0 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.10 | |
- name: Build | |
run: pnpm install && pnpm build | |
- name: Get latest commit message | |
id: get_commit_message | |
run: echo "COMMIT_MSG=$(git log -1 --pretty=%B)" >> $GITHUB_ENV | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload dist folder | |
path: './dist' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
- name: Deploy to GitHub Pages | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
target_branch: gh-pages | |
build_dir: dist | |
commit_message: ${{ env.COMMIT_MSG }} | |
keep_history: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |