diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index d8abd52a..f468d1ed 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -4,7 +4,7 @@ name: Deploy static content to Pages on: # 仅在推送到默认分支时运行。 push: - branches: ['master'] + branches: [ 'master' ] # 这个选项可以使你手动在 Action tab 页面触发工作流 workflow_dispatch: @@ -30,15 +30,23 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Set up Node uses: actions/setup-node@v3 with: node-version: 18 cache: 'pnpm' + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Install dependencies - run: npm install + run: pnpm install + - name: Build - run: npm run build + run: pnpm run build - name: Setup Pages uses: actions/configure-pages@v3 - name: Upload artifact diff --git a/package.json b/package.json index 98015152..58962a65 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vue-tsc && vite build", - "build2": "vite build", + "build": "vite build", + "build-tsc": "vue-tsc && vite build", "report": "vite build", "preview": "vite preview", "commit": "git-cz",