ci: 新增 Gitea Actions 打包新教程站(checkout→node20→corepack yarn4→build @stack/tutorial→上传 dist 产物);移除过时 GitHub Pages 工作流(旧 Docusaurus 站,GitHub 已转纯备份不应触发部署)
This commit is contained in:
1 parent
1d4cc92088
commit
f98c6acea6
2 files changed
+36
-46
No files matched your search
@@ -0,0 +1,36 @@
|
||||
name: Build Tutorial
|
||||
|
||||
# 主仓库 gitea.idealjs.com/idealjs/stack 的 CI:
|
||||
# 打包新教程站(apps/tutorial,Vite MPA,含设计系统四册页)
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build @stack/tutorial
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Enable corepack (yarn 4 via packageManager)
|
||||
run: corepack enable
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build tutorial (Vite MPA 七页 + 设计系统四册)
|
||||
run: yarn workspace @stack/tutorial build
|
||||
|
||||
- name: Upload dist artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: tutorial-dist
|
||||
path: apps/tutorial/dist/
|
||||
retention-days: 14
|
||||
@@ -1,46 +0,0 @@
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
# Review gh actions docs if you want to further define triggers, paths, etc
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Docusaurus
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build website
|
||||
run: yarn workspace stack-idealjs build
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: packages/stack-idealjs/build
|
||||
|
||||
deploy:
|
||||
name: Deploy to GitHub Pages
|
||||
needs: build
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
Reference in new issue
Block a user