Files
stack/.gitea/workflows/ci.yml
T

35 lines
1.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: CI
on:
pull_request:
workflow_dispatch:
env:
YARN_NPM_REGISTRY_SERVER: https://registry.npmmirror.com
concurrency:
# 同一分支/PR 只保留最新 run:新 run 触发即取消在跑的旧 run、排队中的旧 run 直接丢弃。
# runner 侧 capacity=1 只能串行排队、撤不了单;高频 push 时靠这层砍掉过时任务
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
name: check
runs-on: ci
steps:
- name: 拉源码(actions/checkout)
uses: actions/checkout@v4
- name: 安装依赖(yarn 4 由 yarnPath 提供,node 直调)
run: node .yarn/releases/yarn-4.9.2.cjs install --immutable
- name: 格式检查(biome format)
run: node .yarn/releases/yarn-4.9.2.cjs run format:check
- name: 类型检查(tsc -b,连带 design-system 源码)
run: node .yarn/releases/yarn-4.9.2.cjs workspace @stack/tutorial run tsc -b
- name: 打包(vite build + SSG,产物随任务容器丢弃)
run: node .yarn/releases/yarn-4.9.2.cjs workspace @stack/tutorial build