mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2026-11-21 10:53:33 +08:00
Document the template in English and Chinese with a project tree and a runnable TablePro example. Generate public metadata and a sitemap for the demo. BREAKING CHANGE: Shared components now live directly under src/components. Update deep imports from components/base and components/pro. RCollapse was removed.
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
name: Check (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v7.0.1
|
|
- uses: actions/setup-node@v7.1.0
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- uses: pnpm/action-setup@v6.1.0
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Validate harness, typecheck, lint, format, test and build
|
|
run: pnpm check
|
|
|
|
deploy:
|
|
name: Deploy main to dist branch
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
needs: check
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v7.0.1
|
|
- uses: actions/setup-node@v7.1.0
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- uses: pnpm/action-setup@v6.1.0
|
|
- run: pnpm install --frozen-lockfile
|
|
- run: pnpm build
|
|
env:
|
|
RAY_TEMPLATE_SITE_ORIGIN: ${{ github.repository == 'XiaoDaiGua-Ray/ray-template' && 'https://xiaodaigua-ray.github.io' || vars.RAY_TEMPLATE_SITE_ORIGIN }}
|
|
- uses: JamesIves/github-pages-deploy-action@v4.9.0
|
|
with:
|
|
branch: dist
|
|
folder: dist/production
|