Update ci.yaml to use pnpm instead of pnpx for Vercel commands
All checks were successful
CI / build-and-deploy (push) Successful in 3m40s

This commit is contained in:
严浩
2024-09-26 12:46:01 +08:00
parent 6edb5f8462
commit 088e9f0ad7

View File

@ -52,20 +52,20 @@ jobs:
# - name: Install Vercel CLI # - name: Install Vercel CLI
# run: npm install --global vercel@canary # run: npm install --global vercel@canary
- name: Pull Vercel Environment Information - name: Pull Vercel Environment Information
run: pnpx vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} run: pnpm exec vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts - name: Build Project Artifacts
run: pnpx vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} run: pnpm exec vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env: env:
VITE_BUILD_COMMIT: ${{ github.sha }} VITE_BUILD_COMMIT: ${{ github.sha }}
- name: Deploy Project Artifacts to Vercel - name: Deploy Project Artifacts to Vercel
run: pnpx vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} run: pnpm exec vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
# https://github.com/Tencent/tdesign-vue-next/pull/1604#issuecomment-1236244550 # https://github.com/Tencent/tdesign-vue-next/pull/1604#issuecomment-1236244550
- name: Surge - name: Surge
# pnpx surge token # pnpm exec surge token / pnpx surge token
run: | run: |
cp dist/index.html dist/200.html cp dist/index.html dist/200.html
pnpx surge dist https://vue-ts-example.surge.sh --token ${{ secrets.SURGE_TOKEN }} pnpm exec surge dist https://vue-ts-example.surge.sh --token ${{ secrets.SURGE_TOKEN }}
# test: # test:
# needs: build-and-deploy # needs: build-and-deploy