Skip to content

build: 添加仓库信息 #906

build: 添加仓库信息

build: 添加仓库信息 #906

Workflow file for this run

name: Auto Deploy
on:
push:
branches:
- main
- dev
paths-ignore:
- '.github/**'
- '**/*.test.js'
- '**/*.test.ts'
pull_request:
branches-ignore:
- deploy
- deploy-beta
paths-ignore:
- '.github/**'
- '**/*.test.js'
- '**/*.test.ts'
workflow_dispatch:
branches-ignore:
- deploy
- deploy-beta
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Create .npmrc
env:
NPMRC: ${{ secrets.NPMRC }}
run: echo "$NPMRC" >> .npmrc
- name: Install dependencies
run: pnpm install
- name: Build app
run: pnpm run build
- name: Get Deploy Target
id: target
run: echo "deploy=${{ ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref_name == 'main' && 'deploy') || (github.ref_name == 'dev' && 'deploy-beta')) || '' }}" >> $GITHUB_OUTPUT
- name: Get update infos
if: ${{ steps.target.outputs.deploy }}
run: echo "$(git log --pretty=format:%s --grep='^feat(' --grep='^fix(' --grep='^feat:' --grep='^fix:' '${{ github.event.before }}...${{ github.event.after }}' | grep -v Merge)" > dist/CHANGELOG.md
- name: Deploy App
if: ${{ steps.target.outputs.deploy }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
branch: ${{ steps.target.outputs.deploy }}
- name: Purge ChangeLog
if: ${{ steps.target.outputs.deploy }}
run: curl -L https://purge.jsdelivr.net/gh/zvonimirsun/iszy-tools@deploy/CHANGELOG.md