mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-02-03 02:23:38 +08:00
feat(gh-pages): 丰富pages站点的提交信息,实时同步next分支内容
This commit is contained in:
33
.github/workflows/CD.yaml
vendored
33
.github/workflows/CD.yaml
vendored
@@ -58,11 +58,29 @@ jobs:
|
||||
run: |
|
||||
./scripts/bundle build_proxy
|
||||
|
||||
- name: Check GitHub Pages status
|
||||
uses: crazy-max/ghaction-github-status@v3
|
||||
with:
|
||||
pages_threshold: major_outage
|
||||
|
||||
## 获取Git提交信息
|
||||
- name: Get Commit Info
|
||||
id: gitInfo
|
||||
run: |
|
||||
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
||||
echo "author=$(git log -1 --pretty=%an)" >> $GITHUB_OUTPUT
|
||||
echo "email=$(git log -1 --pretty=%ae)" >> $GITHUB_OUTPUT
|
||||
|
||||
## 参考:https://github.com/marketplace/actions/github-pages
|
||||
- name: Deploy To GitHub Page
|
||||
uses: crazy-max/ghaction-github-pages@v3
|
||||
with:
|
||||
target_branch: pages/github
|
||||
build_dir: docs/.vuepress/dist
|
||||
commit_message: chore(sync) v${{steps.gitInfo.outputs.version}}
|
||||
committer: ${{steps.gitInfo.outputs.author}}<${{steps.gitInfo.outputs.email}}>
|
||||
author: Mr·Sync
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -115,20 +133,21 @@ jobs:
|
||||
|
||||
# 提取版本号
|
||||
- name: Get New Version Number
|
||||
id: extract_version
|
||||
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
|
||||
id: releaseVersion
|
||||
run: |
|
||||
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
||||
|
||||
# 创建发布版本
|
||||
- name: Create New Release
|
||||
id: create_release
|
||||
id: createRelease
|
||||
uses: actions/create-release@latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: v${{ steps.extract_version.outputs.version }}
|
||||
release_name: v${{ steps.extract_version.outputs.version }}
|
||||
tag_name: v${{ steps.releaseVersion.outputs.version }}
|
||||
release_name: v${{ steps.releaseVersion.outputs.version }}
|
||||
body: |
|
||||
Release ${{ steps.extract_version.outputs.version }}
|
||||
Release ${{ steps.releaseVersion.outputs.version }}
|
||||
|
||||
### Features
|
||||
|
||||
@@ -140,7 +159,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
upload_url: ${{ steps.createRelease.outputs.upload_url }}
|
||||
asset_path: ./408CSFamily.zip
|
||||
asset_name: 408CSFamily.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
Reference in New Issue
Block a user