chore: github pages for web bundle (#898)

* chore: github pages for web bundle

* docs: updated Bundle distribution setup

* chore: addressed PR comments

---------

Co-authored-by: Murat Ozcan <murat@mac.lan>
This commit is contained in:
Murat K Ozcan
2025-11-11 13:35:30 -06:00
committed by GitHub
parent 487d1582a0
commit 449b5b3d29
7 changed files with 492 additions and 17 deletions

View File

@@ -0,0 +1,95 @@
# Bundle Distribution Setup (For Maintainers)
**Audience:** BMAD maintainers setting up bundle auto-publishing
---
## One-Time Setup
Run these commands once to enable auto-publishing:
```bash
# 1. Create bmad-bundles repo
gh repo create bmad-code-org/bmad-bundles --public --description "BMAD Web Bundles"
# 2. Ensure `main` exists (GitHub Pages API requires a source branch)
git clone git@github.com:bmad-code-org/bmad-bundles.git
cd bmad-bundles
printf '# bmad-bundles\n\nStatic bundles published from BMAD-METHOD.\n' > README.md
git add README.md
git commit -m "Initial commit"
git push origin main
cd -
# 3. Enable GitHub Pages (API replacement for removed --enable-pages flag)
gh api repos/bmad-code-org/bmad-bundles/pages --method POST -f source[branch]=main -f source[path]=/
# (Optional) confirm status
gh api repos/bmad-code-org/bmad-bundles/pages --jq '{status,source}'
# 4. Create GitHub PAT and add as secret
# Go to: https://github.com/settings/tokens/new
# Scopes: repo (full control)
# Name: bmad-bundles-ci
# Then add as secret:
gh secret set BUNDLES_PAT --repo bmad-code-org/BMAD-METHOD
# (paste PAT when prompted)
```
If the Pages POST returns `409`, the site already exists. If it returns `422` about `main` missing, redo step 2 to push the initial commit.
**Done.** Bundles auto-publish on every main merge.
---
## How It Works
**On main merge:**
- `.github/workflows/bundle-latest.yaml` runs
- Publishes to: `https://bmad-code-org.github.io/bmad-bundles/`
**On release:**
- `npm run release:patch` runs `.github/workflows/manual-release.yaml`
- Attaches bundles to: `https://github.com/bmad-code-org/BMAD-METHOD/releases/latest`
---
## Testing
```bash
# Test latest channel
git push origin main
# Wait 2 min, then: curl https://bmad-code-org.github.io/bmad-bundles/
# Test stable channel
npm run release:patch
# Check: gh release view
```
---
## Troubleshooting
**"Permission denied" or auth errors**
```bash
# Verify PAT secret exists
gh secret list --repo bmad-code-org/BMAD-METHOD | grep BUNDLES_PAT
# If missing, recreate PAT and add secret:
gh secret set BUNDLES_PAT --repo bmad-code-org/BMAD-METHOD
```
**GitHub Pages not updating / need to re-check config**
```bash
gh api repos/bmad-code-org/bmad-bundles/pages --jq '{status,source,html_url}'
```
---
## Distribution URLs
**Stable:** `https://github.com/bmad-code-org/BMAD-METHOD/releases/latest`
**Latest:** `https://bmad-code-org.github.io/bmad-bundles/`

88
docs/USING_WEB_BUNDLES.md Normal file
View File

@@ -0,0 +1,88 @@
# Using BMAD Web Bundles (For Users)
**Audience:** Users wanting to use BMAD agents in Claude Projects, ChatGPT, or Gemini
---
## Quick Start
**1. Pick your channel:**
- **Stable:** `https://github.com/bmad-code-org/BMAD-METHOD/releases/latest`
- **Latest:** `https://bmad-code-org.github.io/bmad-bundles/`
**2. Copy raw markdown URL:**
```
https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/claude-code/sub-agents/bmm-agent-pm.md
```
**3. Add to AI platform:**
- **Claude Projects:** Project Knowledge → Add URL
- **ChatGPT:** Custom Instructions → Paste content
- **Gemini Gems:** Knowledge → Add URL
---
## Available Agents
### Claude Code
- [PM](https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/claude-code/sub-agents/bmm-agent-pm.md) | [Architect](https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/claude-code/sub-agents/bmm-agent-architect.md) | [TEA](https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/claude-code/sub-agents/bmm-agent-tea.md) | [Developer](https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/claude-code/sub-agents/bmm-agent-dev.md)
- [All Agents](https://github.com/bmad-code-org/bmad-bundles/tree/main/claude-code/sub-agents)
### ChatGPT / Gemini
- [Browse ChatGPT](https://github.com/bmad-code-org/bmad-bundles/tree/main/chatgpt/sub-agents)
- [Browse Gemini](https://github.com/bmad-code-org/bmad-bundles/tree/main/gemini/sub-agents)
---
## Stable vs Latest
**Stable (GitHub Releases):**
- Production-ready, tested releases
- Version-pinned (v6.0.0, etc.)
- Download: `https://github.com/bmad-code-org/BMAD-METHOD/releases/latest`
**Latest (GitHub Pages):**
- Bleeding edge (main branch)
- Auto-updated on every merge
- Browse: `https://bmad-code-org.github.io/bmad-bundles/`
---
## Full Installation (Recommended)
For IDE integration with slash commands:
```bash
npx bmad-method@alpha install
```
Gives you:
- Slash commands (`/bmad:bmm:workflows:prd`)
- 34+ workflows (not just agents)
- Status tracking (workflow-status.yaml)
- Local customization
---
## Troubleshooting
**ChatGPT: "File too large"**
→ Use stable release (compressed) or report issue
**Bundle not loading**
→ Use raw URL (not GitHub UI link)
**Out of date**
→ Wait 2-3 min after main merge, then refresh
---
**Issues?** Report at https://github.com/bmad-code-org/BMAD-METHOD/issues

View File

@@ -29,6 +29,8 @@ Complete map of all BMad Method v6 documentation with recommended reading paths.
- **[v4 to v6 Upgrade Guide](./v4-to-v6-upgrade.md)** - Migration path for v4 users
- **[Document Sharding Guide](./document-sharding-guide.md)** - Split large documents for 90%+ token savings
- **[Web Bundles](./USING_WEB_BUNDLES.md)** - Use BMAD agents in Claude Projects, ChatGPT, or Gemini without installation
- **[Bundle Distribution Setup](./BUNDLE_DISTRIBUTION_SETUP.md)** - Maintainer guide for bundle auto-publishing
---