refactor: umi v4 support

This commit is contained in:
baorong
2026-03-13 23:07:16 +08:00
parent 9989aa4de5
commit 8f7dd82e40
268 changed files with 5727 additions and 28785 deletions
+76
View File
@@ -0,0 +1,76 @@
++ name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Enable corepack (pnpm)
run: |
corepack enable
corepack prepare pnpm@latest --activate
- name: Cache pnpm store
uses: actions/cache@v4
with:
path: |
~/.pnpm-store
~/.cache/pnpm
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install dependencies
run: pnpm install
- name: Test (if present)
run: pnpm test --if-present
- name: Lint
run: pnpm run lint
- name: Build
run: pnpm run build
- name: Upload build (artifact)
if: success()
uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist
publish:
name: Publish to GitHub Pages
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dist
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./dist
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}