diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 55606bd..ca6875a 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -1,3 +1,4 @@ +# https://cn.vitejs.dev/guide/static-deploy name: CI on: @@ -5,6 +6,10 @@ on: branches: - main pull_request: + workflow_dispatch: +concurrency: + group: 'ci' + cancel-in-progress: true jobs: cache-and-install: @@ -27,10 +32,18 @@ jobs: cache: 'pnpm' - name: Install dependencies - run: pnpm install # --frozen-lockfile + run: pnpm install --frozen-lockfile - name: Lint run: pnpm lint - name: Build run: pnpm build + env: + VITE_BUILD_COMMIT: ${{ github.sha | slice(0, 7) }} + + # https://github.com/Tencent/tdesign-vue-next/pull/1604#issuecomment-1236244550 + - name: Surge + # pnpx surge token + run: | + pnpx surge dist vue-ts-example.surge.sh --token ${{ secrets.SURGE_TOKEN }}