Skip to content

Commit 8694236

Browse files
committed
build: 🏗️ release.yml github action
1 parent 4b8c277 commit 8694236

File tree

1 file changed

+8
-39
lines changed

1 file changed

+8
-39
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,13 @@ jobs:
5252
name: web-build
5353
path: dist.zip
5454

55-
- name: Prepare GitHub Pages artifact
56-
run: |
57-
cp -r dist-prod dist-gh-pages
58-
59-
- name: Upload GitHub Pages artifact
60-
uses: actions/upload-artifact@v4
55+
- name: Deploy to gh-pages branch
56+
uses: peaceiris/actions-gh-pages@v3
6157
with:
62-
name: github-pages
63-
path: dist-gh-pages
58+
github_token: ${{ secrets.GITHUB_TOKEN }}
59+
publish_dir: ./dist-prod
60+
publish_branch: gh-pages
61+
force_orphan: true
6462

6563
publish-tauri:
6664
permissions:
@@ -108,37 +106,8 @@ jobs:
108106
prerelease: false
109107
run: pnpm tauri build
110108

111-
deploy-gh-pages:
112-
needs: build-web
113-
runs-on: ubuntu-latest
114-
permissions:
115-
contents: read
116-
pages: write
117-
id-token: write
118-
119-
environment:
120-
name: github-pages
121-
url: ${{ steps.deployment.outputs.page_url }}
122-
123-
steps:
124-
- name: Download GitHub Pages artifact
125-
uses: actions/download-artifact@v4
126-
with:
127-
name: github-pages
128-
path: dist-gh-pages
129-
130-
- name: Setup Pages
131-
uses: actions/configure-pages@v3
132-
133-
- name: Upload to GitHub Pages
134-
uses: actions/deploy-pages@v2
135-
id: deployment
136-
with:
137-
github_token: ${{ secrets.GITHUB_TOKEN }}
138-
publish_dir: ./dist-gh-pages
139-
140109
release:
141-
needs: [build-web, publish-tauri, deploy-gh-pages]
110+
needs: [build-web, publish-tauri]
142111
runs-on: ubuntu-latest
143112
steps:
144113
- name: Checkout code
@@ -157,4 +126,4 @@ jobs:
157126
name: 'Release ${{ github.ref_name }}'
158127
draft: true
159128
prerelease: false
160-
generate_release_notes: true
129+
generate_release_notes: true

0 commit comments

Comments
 (0)