docs(cloud-build): GitHub Actions guide with combined .env export#704
Conversation
New page walks users through the full GitHub Actions setup:
- one `gh secret set CAPGO_TOKEN` for the API key
- `build credentials manage` → Export to .env → single
`.env.capgo.<appId>` file containing both platforms' secrets
- `gh secret set -f .env.capgo.<appId>` to push every CI secret in one shot
Includes three workflow templates (manual dispatch, tag-based release
with iOS+Android matrix, debug build on push to main), shared-key
conflict guidance, and CI-specific troubleshooting.
Replaces the inline GitHub Actions YAML snippet in getting-started.mdx
with a link to the new page so the canonical workflow examples live in
one place.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new GitHub Actions guide for Capgo Cloud Build (setup, secrets, three workflow examples, caching, patterns, troubleshooting) and updates cloud-build sidebar ordering and getting-started to reference the new guide. ChangesGitHub Actions Documentation
sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant CapgoCLI as Capgo CLI
participant Secrets as GitHub Secrets
Dev->>CapgoCLI: export credentials -> .env.capgo.<appId>
Dev->>Secrets: gh secret set -f (.env.capgo.<appId>) -> per-platform secrets
GH->>Secrets: read CAPGO_TOKEN + per-platform secrets
GH->>CapgoCLI: run bunx `@capgo/cli` build with env secrets
CapgoCLI->>GH: return build output (URL/QR) or upload artifacts
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8b6c82059
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…pture Replaces the regex-and-tee scraping pattern with the clean opt-in record flow shipped in Cap-go/capgo#2290: --output-record /tmp/build.json → npx @capgo/cli build last-output --field outputUrl Also adds two troubleshooting rows for empty URLs (build had no --output-upload or failed early) and schemaVersion mismatches (producer and reader on different CLI versions).
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/docs/src/content/docs/docs/cli/cloud-build/github-actions.mdx`:
- Line 383: Update the table cell that currently advises "Pin both producer and
reader to the same `@capgo/cli@latest` version" so it recommends using an
explicit, fixed version string instead of `@latest` (e.g. `@capgo/cli@x.y.z`)
for both producer and reader; change the text referencing `@capgo/cli@latest` to
something like "Pin both producer and reader to the same explicit
`@capgo/cli@x.y.z` version" to avoid suggesting a floating tag.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d127d80b-4cef-472b-8c79-21be11125440
📒 Files selected for processing (4)
apps/docs/src/content/docs/docs/cli/cloud-build/credentials.mdxapps/docs/src/content/docs/docs/cli/cloud-build/getting-started.mdxapps/docs/src/content/docs/docs/cli/cloud-build/github-actions.mdxapps/docs/src/content/docs/docs/cli/cloud-build/troubleshooting.mdx
The page's CI examples used `actions/setup-node` + `npm ci` + `npx`,
which (a) violates the website's documented tooling convention
(AGENTS.md: "Always use bun instead of npm. Always use bunx instead of
npx.") and (b) breaks bun-only projects out of the box because `npm ci`
requires a `package-lock.json` that doesn't exist when the lockfile is
`bun.lock`.
Match the rest of cloud-build/*.mdx and the linked `getting-started.mdx`:
- `actions/setup-node@v4 + cache: 'npm'` → `oven-sh/setup-bun@v2`
- `npm ci` → `bun install --frozen-lockfile`
- `npm run build` → `bun run build`
- `npx cap sync …` → `bunx cap sync …`
- `npx @capgo/cli@latest …` → `bunx @capgo/cli@latest …`
- `npm version` → `bun pm version`
- Cache section: rewritten around `~/.bun/install/cache` + `bun.lock`,
with an honest note that bun installs are fast enough that the JS
cache is rarely the bottleneck.
Troubleshooting row updated: "you forgot npm ci before cap sync" → "you
forgot bun install before cap sync".
…latest The schemaVersion-mismatch troubleshooting cell previously said 'pin both producer and reader to the same @capgo/cli@latest version', which contradicts itself — @latest is a floating tag that can change between the producer job and a later reader job, so pinning to it pins nothing. Recommend an explicit semver pin (e.g. @capgo/cli@7.104.0) on both sides instead.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
apps/docs/src/content/docs/docs/cli/cloud-build/github-actions.mdx (1)
380-380:⚠️ Potential issue | 🟡 Minor | ⚡ Quick win“Pin to
@latest” is contradictory; use an explicit CLI version.
@latestis floating, so this guidance does not actually pin producer/reader compatibility forbuild last-outputschema parsing.Suggested edit
-| `build last-output` errors with `Unsupported record schemaVersion` | The runner is on an older CLI than the one that wrote the record. Pin both producer and reader to the same `@capgo/cli@latest` version | +| `build last-output` errors with `Unsupported record schemaVersion` | The runner is on an older CLI than the one that wrote the record. Pin both producer and reader to the same explicit `@capgo/cli@x.y.z` version |Is npm package tag `@latest` a floating dist-tag (not a pinned immutable version), and is `@package@x.y.z` the correct way to pin a CLI version in docs?🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/docs/src/content/docs/docs/cli/cloud-build/github-actions.mdx` at line 380, Update the doc line that recommends pinning both producer and reader to `@capgo/cli@latest`: clarify that `@latest` is a floating dist-tag and replace it with guidance to pin to an explicit immutable version (e.g., `@capgo/cli@x.y.z`) so `build last-output` schema compatibility is ensured; edit the text referencing `build last-output` and the `@capgo/cli@latest` token to show the correct pinning form (`@package@x.y.z`) and an example of using an explicit version.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/docs/src/content/docs/docs/cli/cloud-build/github-actions.mdx`:
- Line 326: Update the user-facing sentence that references `--qr` so that the
word "Markdown" is capitalized; locate the line containing the backticked `--qr`
example and change "markdown code fence" to "Markdown code fence" to use the
proper noun form.
---
Duplicate comments:
In `@apps/docs/src/content/docs/docs/cli/cloud-build/github-actions.mdx`:
- Line 380: Update the doc line that recommends pinning both producer and reader
to `@capgo/cli@latest`: clarify that `@latest` is a floating dist-tag and
replace it with guidance to pin to an explicit immutable version (e.g.,
`@capgo/cli@x.y.z`) so `build last-output` schema compatibility is ensured; edit
the text referencing `build last-output` and the `@capgo/cli@latest` token to
show the correct pinning form (`@package@x.y.z`) and an example of using an
explicit version.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a7b757aa-e6fc-4f7f-a82a-521a6662705e
📒 Files selected for processing (1)
apps/docs/src/content/docs/docs/cli/cloud-build/github-actions.mdx
|



Summary
Adds a dedicated GitHub Actions page under
apps/docs/.../cli/cloud-build/that walks users through the full CI/CD setup using the new combined.envexport frombuild credentials manage(shipped in Cap-go/capgo#2280).The new flow
gh secret set CAPGO_TOKEN --body "..."npx @capgo/cli@latest build credentials manage --appId <appId>→ Export to .env → writes.env.capgo.<appId>containing both platforms' secretsgh secret set -f .env.capgo.<appId>— one shot, every secret pushed to GitHubNo manual base64 encoding, no JSON wrangling, no copy-pasting one secret at a time.
Page contents
<Steps>block with API key, export, secret push, workflow file)node_modules/Pods/.gradleOther edits
getting-started.mdx— replaces the inline 10-line GitHub Actions snippet under "CI/CD Integration" with a link to the new page (eliminates duplication; resolves a conflict where main updated the snippet tobun)troubleshooting.mdx— sidebarorder: 5→6credentials.mdx— sidebarorder: 6→7Sidebar after this PR
Dependency
Documents behaviour shipped by Cap-go/capgo#2280 (merged). Should land after the next
@capgo/clirelease publishes the combined-export.Test plan
bun run dev:docsrenders the new page at/docs/cli/cloud-build/github-actions/<CardGrid>,<Steps>,<Aside>,<LinkCard>)/docs/webapp/api-keys/,/docs/cli/cloud-build/credentials/,/docs/cli/cloud-build/configuration/,/docs/cli/cloud-build/ios/,/docs/cli/cloud-build/android/,/docs/cli/cloud-build/troubleshooting/)Summary by CodeRabbit