From 3dfa5ec99a1c04637acf106297353cd392464937 Mon Sep 17 00:00:00 2001 From: z9130 <984661593@qq.com> Date: Mon, 16 Sep 2024 12:02:26 +0800 Subject: [PATCH] actions test6 --- .gitea/workflows/build-action.yaml | 44 ++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/build-action.yaml b/.gitea/workflows/build-action.yaml index 6ebc5ef7..9ef65e24 100644 --- a/.gitea/workflows/build-action.yaml +++ b/.gitea/workflows/build-action.yaml @@ -1,17 +1,37 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +name: Frontend CI/CD + on: [push] jobs: - Explore-Gitea-Actions: + build: runs-on: pansoft + strategy: + matrix: + project: [web-office] + steps: - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ gitea.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." + # Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4 + + # Set up Node.js environment + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: "22" # 确保使用与你项目兼容的 Node.js 版本 + + # Install pnpm + - name: Install pnpm + run: npm install -g pnpm + + # Install dependencies using Turborepo + - name: Install dependencies with Turborepo + run: pnpm install + + # Build the project + - name: Build project + env: + TURBO_FORCE: true # 强制全量构建,确保 Turborepo 正确地优化构建过程 + run: pnpm build --filter apps/${{ matrix.project }} + + # 你可以在这里添加更多步骤,例如部署到服务器或生成的静态文件存储。