From c4003ac89b34b56978d03c47fce0c0c5afde285f Mon Sep 17 00:00:00 2001 From: JavaZero <71128095+JavaZeroo@users.noreply.github.com> Date: Mon, 28 Jul 2025 15:42:24 +0800 Subject: [PATCH] Add build artifact upload --- .github/workflows/deploy.yml | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a35dd44..39bd84a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,6 +35,15 @@ jobs: - name: Build run: npm run build + - name: Package build output + run: zip -r dist.zip dist + + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: dist-package + path: dist.zip + - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/README.md b/README.md index 1af44f6..8e3f7d8 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ 2. 在仓库设置中启用 GitHub Pages 3. 选择 GitHub Actions 作为部署源 4. 推送代码时将自动触发构建和部署 +5. 部署完成后,可在 `Deploy to GitHub Pages` 工作流中下载自动生成的 `dist.zip` 以进行本地部署 ## 📝 使用指南