版本: v1.0 最后更新: 2026-04-03 受众: 开发者、DevOps 工程师 阅读时间: 10 分钟
PostWaver 的 Web UI 和 Converter Web 通过 GitHub Actions 自动部署到 GitHub Pages。
GitHub Repository
↓
GitHub Actions Workflow
↓
构建 (pnpm build)
↓
部署到 GitHub Pages
↓
https://yourusername.github.io/post_waver/
位置:.github/workflows/deploy-web-ui.yml
name: Deploy Web UI
on:
push:
branches: [ main ]
paths:
- 'packages/web-ui/**'
- 'packages/converter-web/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Build
run: |
pnpm install
pnpm build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: $
publish_dir: ./packages/web-ui/dist
postwaver.yourdomain.com)CNAME postwaver.yourdomain.com → yourusername.github.io
无需额外配置,使用内置的 GITHUB_TOKEN。
确保 workflow 有以下权限:
permissions:
contents: read
pages: write
id-token: write
git add .
git commit -m "feat: add new feature"
git push origin main
GitHub Actions 自动检测到推送并开始部署。
访问:https://github.com/YOUR_USERNAME/post_waver/actions
部署完成后,访问:
https://YOUR_USERNAME.github.io/post_waver/
检查步骤:
publish_dir 路径解决方案:
解决方案:
最后更新: 2026-04-03 维护者: PostWaver Team 反馈: GitHub Issues