From 37734942f778c398ca044431fb7d2c0c6a6bf558 Mon Sep 17 00:00:00 2001 From: kunish Date: Mon, 28 Aug 2023 00:55:08 +0800 Subject: [PATCH] ci: merge gh-pages and gh release into one job --- .github/workflows/release.yml | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d1f30f31..7dc92c65 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} release-type: node - gh-pages: + release: needs: release-please runs-on: ubuntu-latest if: ${{ needs.release-please.outputs.release_created }} @@ -39,39 +39,22 @@ jobs: cache: pnpm node-version: latest - - name: build + - name: install dependencies + run: pnpm install + + - name: build for gh-pages env: PUBLIC_PATH: '/metacubexd' - run: | - pnpm install - pnpm build + run: pnpm build - - name: Publish Github Pages + - name: publish github pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./dist - release: - needs: release-please - runs-on: ubuntu-latest - if: ${{ needs.release-please.outputs.release_created }} - steps: - - uses: actions/checkout@v3 - - - uses: pnpm/action-setup@v2 - with: - version: latest - - - uses: actions/setup-node@v3 - with: - cache: pnpm - node-version: latest - - - name: build - run: | - pnpm install - pnpm build + - name: build for release + run: pnpm build - name: zip run: |