From e62b883e6c33148294ce0cfec4ed15f95e96b1b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Mon, 25 Nov 2024 14:43:59 +0800 Subject: [PATCH] feat: consolidate site build jobs into a single concurrent step in GitHub Actions workflow --- .github/workflows/pr-preview.yml | 36 +++++++------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 65c473cc..92e6a0c4 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -6,7 +6,7 @@ on: - main jobs: - checkout-install: + build-and-deploy: runs-on: ubuntu-latest steps: @@ -24,37 +24,15 @@ jobs: - name: Set ARCO_SITE_DOMAIN run: echo "ARCO_SITE_DOMAIN=preview-${{ github.event.number }}-arco-design-mobile.surge.sh" >> $GITHUB_ENV - build-home: - runs-on: ubuntu-latest - needs: checkout-install - steps: - - name: Build site:home - run: npm run site:home - env: - ARCO_SITE_DOMAIN: ${{ env.ARCO_SITE_DOMAIN }} - - build-pc: - runs-on: ubuntu-latest - needs: checkout-install - steps: - - name: Build site:pc - run: npm run site:pc - env: - ARCO_SITE_DOMAIN: ${{ env.ARCO_SITE_DOMAIN }} - - build-mobile: - runs-on: ubuntu-latest - needs: checkout-install - steps: - - name: Build site:mobile - run: npm run site:mobile + - name: Build sites concurrently + run: | + npm run site:home & + npm run site:pc & + npm run site:mobile & + wait env: ARCO_SITE_DOMAIN: ${{ env.ARCO_SITE_DOMAIN }} - merge-and-deploy: - runs-on: ubuntu-latest - needs: [build-home, build-pc, build-mobile] - steps: - name: Merge output directories run: | # 合并文件