From d27bec83cafddf5f61051fc4fe7a89d9a59ef710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Sat, 12 Oct 2024 14:32:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20CI=20=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=EF=BC=8C=E4=BD=BF=E7=94=A8=E5=A4=8D=E5=90=88=E5=8A=A8?= =?UTF-8?q?=E4=BD=9C=E9=83=A8=E7=BD=B2=E5=88=B0=20Surge=EF=BC=8C=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E6=97=A7=E7=9A=84=20Surge=20=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yaml | 40 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7bca554..0e5f6f1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,19 +38,9 @@ jobs: env: VITE_BUILD_COMMIT: ${{ github.sha }} - name: 部署到 Surge - if: ${{ !github.event.act }} # https://nektosact.com/usage/index.html#skipping-steps id: surge_deploy - # pnpm exec surge token / pnpx surge token - # https://github.com/Tencent/tdesign-vue-next/pull/1604#issuecomment-1236244550 - # https://github.com/Tencent/tdesign-vue-next/blob/03036a19adccf4657d7792e3a61a6c6a7d902e3e/.github/workflows/preview-publish.yml - # https://github.com/Tencent/tdesign/blob/0c0c9b63897c05d10c58e1a1e36feda2cb99eca7/.github/workflows/preview.yml#L40 - run: | - export DEPLOY_DOMAIN=https://${{ github.sha }}.surge.sh - cp dist/index.html dist/200.html - pnpm exec surge --project ./dist --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }} - echo the preview URL is $DEPLOY_DOMAIN - - echo "url=$DEPLOY_DOMAIN" >> $GITHUB_OUTPUT + if: ${{ !github.event.act }} # https://nektosact.com/usage/index.html#skipping-steps + uses: yanhao98/composite-actions/deploy-dist-to-surge@c1cee30ad33e363e4a7f6a5e15b03a9d2034b922 - name: Install Playwright Browsers run: pnpm exec playwright install --with-deps - name: Run Playwright tests @@ -66,16 +56,16 @@ jobs: - run: npx depcheck || true - run: node .depcheck.js - surge-preview: - runs-on: ubuntu-latest - permissions: - pull-requests: write # allow surge-preview to create/update PR comments - steps: - - uses: yanhao98/composite-actions/setup-node-environment@main - - uses: afc163/surge-preview@v1 - id: surge_preview_step - with: - dist: dist - build: pnpm run build-only - - name: Get the preview_url - run: echo "url => ${{ steps.surge_preview_step.outputs.preview_url }}" + # surge-preview: + # runs-on: ubuntu-latest + # permissions: + # pull-requests: write # allow surge-preview to create/update PR comments + # steps: + # - uses: yanhao98/composite-actions/setup-node-environment@main + # - uses: afc163/surge-preview@v1 + # id: surge_preview_step + # with: + # dist: dist + # build: pnpm run build-only + # - name: Get the preview_url + # run: echo "url => ${{ steps.surge_preview_step.outputs.preview_url }}"