diff --git a/.gitea/workflows/build-tutorial.yml b/.gitea/workflows/build-tutorial.yml new file mode 100644 index 0000000..f34a30e --- /dev/null +++ b/.gitea/workflows/build-tutorial.yml @@ -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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 0dcdabb..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -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