docs: updated Bundle distribution setup
This commit is contained in:
parent
8719ffaa3d
commit
4b33badbaa
|
|
@ -6,22 +6,35 @@
|
||||||
|
|
||||||
## One-Time Setup
|
## One-Time Setup
|
||||||
|
|
||||||
Run these 3 commands to enable auto-publishing:
|
Run these commands once to enable auto-publishing:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Create bmad-bundles repo
|
# 1. Create bmad-bundles repo
|
||||||
gh repo create bmad-code-org/bmad-bundles --public --description "BMAD Web Bundles"
|
gh repo create bmad-code-org/bmad-bundles --public --description "BMAD Web Bundles"
|
||||||
|
|
||||||
# 2. Enable GitHub Pages
|
# 2. Ensure `main` exists (GitHub Pages API requires a source branch)
|
||||||
gh repo edit bmad-code-org/bmad-bundles --enable-pages --pages-branch main
|
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. Create deploy key
|
# 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 deploy key
|
||||||
ssh-keygen -t ed25519 -C "github-actions" -f deploy-key -N ""
|
ssh-keygen -t ed25519 -C "github-actions" -f deploy-key -N ""
|
||||||
gh repo deploy-key add deploy-key.pub --repo bmad-code-org/bmad-bundles --title "CI" --allow-write
|
gh repo deploy-key add deploy-key.pub --repo bmad-code-org/bmad-bundles --title "CI" --allow-write
|
||||||
gh secret set BUNDLES_DEPLOY_KEY --repo bmad-code-org/BMAD-METHOD < deploy-key
|
gh secret set BUNDLES_DEPLOY_KEY --repo bmad-code-org/BMAD-METHOD < deploy-key
|
||||||
rm deploy-key*
|
rm deploy-key*
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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.
|
**Done.** Bundles auto-publish on every main merge.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
@ -62,10 +75,10 @@ npm run release:patch
|
||||||
gh secret list --repo bmad-code-org/BMAD-METHOD | grep BUNDLES
|
gh secret list --repo bmad-code-org/BMAD-METHOD | grep BUNDLES
|
||||||
```
|
```
|
||||||
|
|
||||||
**GitHub Pages not updating**
|
**GitHub Pages not updating / need to re-check config**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
gh repo edit bmad-code-org/bmad-bundles --enable-pages
|
gh api repos/bmad-code-org/bmad-bundles/pages --jq '{status,source,html_url}'
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue