Skip to content

Commit 042b3ce

Browse files
authored
Add build artifact upload (#24)
1 parent ce9fc8d commit 042b3ce

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ jobs:
3535
- name: Build
3636
run: npm run build
3737

38+
- name: Package build output
39+
run: zip -r dist.zip dist
40+
41+
- name: Upload build artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: dist-package
45+
path: dist.zip
46+
3847
- name: Deploy to GitHub Pages
3948
uses: JamesIves/github-pages-deploy-action@v4
4049
with:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
2. 在仓库设置中启用 GitHub Pages
7878
3. 选择 GitHub Actions 作为部署源
7979
4. 推送代码时将自动触发构建和部署
80+
5. 部署完成后,可在 `Deploy to GitHub Pages` 工作流中下载自动生成的 `dist.zip` 以进行本地部署
8081

8182
## 📝 使用指南
8283

0 commit comments

Comments
 (0)