From 8694236b9d092d1e014938e220b28d94b32ead0d Mon Sep 17 00:00:00 2001 From: log1997 <2694233102@qq.com> Date: Wed, 31 Dec 2025 09:42:31 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=F0=9F=8F=97=EF=B8=8F=20release.yml=20?= =?UTF-8?q?github=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 47 ++++++----------------------------- 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9352313..8fee00e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,15 +52,13 @@ jobs: name: web-build path: dist.zip - - name: Prepare GitHub Pages artifact - run: | - cp -r dist-prod dist-gh-pages - - - name: Upload GitHub Pages artifact - uses: actions/upload-artifact@v4 + - name: Deploy to gh-pages branch + uses: peaceiris/actions-gh-pages@v3 with: - name: github-pages - path: dist-gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist-prod + publish_branch: gh-pages + force_orphan: true publish-tauri: permissions: @@ -108,37 +106,8 @@ jobs: prerelease: false run: pnpm tauri build - deploy-gh-pages: - needs: build-web - runs-on: ubuntu-latest - permissions: - contents: read - pages: write - id-token: write - - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - steps: - - name: Download GitHub Pages artifact - uses: actions/download-artifact@v4 - with: - name: github-pages - path: dist-gh-pages - - - name: Setup Pages - uses: actions/configure-pages@v3 - - - name: Upload to GitHub Pages - uses: actions/deploy-pages@v2 - id: deployment - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist-gh-pages - release: - needs: [build-web, publish-tauri, deploy-gh-pages] + needs: [build-web, publish-tauri] runs-on: ubuntu-latest steps: - name: Checkout code @@ -157,4 +126,4 @@ jobs: name: 'Release ${{ github.ref_name }}' draft: true prerelease: false - generate_release_notes: true + generate_release_notes: true \ No newline at end of file