Skip to content

wip: 🚧 tag页面 #76

wip: 🚧 tag页面

wip: 🚧 tag页面 #76

Workflow file for this run

name: Build
on:
push:
branches:
- master
tags-ignore:
- '**'
jobs:
Vitepress_build:
runs-on: ubuntu-latest
name: Vitepress build
steps:
- uses: actions/checkout@v2
- name: Setup Node.js and pnpm
uses: actions/setup-node@v3
with:
node-version: '20.10.0' # 设置 nodejs 的版本
- name: Install pnpm
run: npm install -g pnpm # 全局安装 pnpm
- name: Install dependencies
run: pnpm install # 使用 pnpm 安装依赖
- name: Build VitePress
run: |
pnpm run build:docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist
publish_branch: gh-pages
dotfiles: true
- name: Create Tag
id: create_tag
uses: jaywcjlove/create-tag-action@v1.3.6
with:
package-path: ./package.json
- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
- run: echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV
- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
if: env.previous_tag
with:
head-ref: ${{steps.create_tag.outputs.version}}
filter-author: (renovate-bot|Renovate Bot)
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
# - name: Create Release
# uses: ncipollo/release-action@v1
# if: steps.create_tag.outputs.successful
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# name: ${{ steps.create_tag.outputs.version }}
# tag: ${{ steps.create_tag.outputs.version }}
# body: |
# Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
# ${{ steps.changelog.outputs.changelog }}
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}