* build: 🏗️ 构建与校验

* build: 🏗️ release.yml github action
This commit is contained in:
LOG1997
2025-12-31 09:56:32 +08:00
committed by GitHub
parent 52e2d138e2
commit 2783fb4c0e
2 changed files with 19 additions and 60 deletions

View File

@@ -51,26 +51,14 @@ jobs:
with:
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
- name: Prepare GitHub Pages artifact
run: |
cp -r dist-prod dist-gh-pages
- name: Upload GitHub Pages artifact
uses: actions/upload-artifact@v4
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:
@@ -118,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