From d00be169c370955cba65428edfbba118da8a86ce Mon Sep 17 00:00:00 2001 From: kunish Date: Sun, 27 Aug 2023 23:42:27 +0800 Subject: [PATCH] ci: merge gh-pages with release workflow --- .github/workflows/publish-gh-pages.yml | 34 -------------------------- .github/workflows/release.yml | 8 ++++++ 2 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/publish-gh-pages.yml diff --git a/.github/workflows/publish-gh-pages.yml b/.github/workflows/publish-gh-pages.yml deleted file mode 100644 index dd9d443..0000000 --- a/.github/workflows/publish-gh-pages.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Publish Github Pages - -on: - push: - branches: - - main - -jobs: - publish-gh-pages: - runs-on: ubuntu-latest - 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 - env: - PUBLIC_PATH: /metacubexd - run: | - pnpm install - pnpm build - - - name: Publish Github Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78a6f3f..e31e906 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,5 @@ +name: release + on: push: branches: main @@ -47,3 +49,9 @@ jobs: with: files: dist/* tag_name: ${{ needs.release-please.outputs.tag_name }} + + - name: Publish Github Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist