클라이언트는 Lovable에서 모든 활성 사용자에게 변경 사항을 전송하는 단일 버튼이 필요합니다. 이미 업데이트 경로가 작동하는지 이미 증명했습니다:
npx @capgo/cli@latest bundle upload --channel=production --auto-bump
이미 업데이트 경로가 작동하는지 이미 증명했습니다: Lovable에서 Capgo을 실행하는 또 다른 터미널 명령어는 필요하지 않습니다. Lovable에서 GitHub을 실행하는 또 다른 터미널 명령어는 필요하지 않습니다. Publish에서 __CAPGO_KEEP_0__이 동기화되면. GitHub Actions runs the build and bundle upload . __CAPGO_KEEP_0__ Actions는 빌드와
빌드와 __CAPGO_KEEP_0__ 동기화를 위해 CAPGO_TOKEN 이 안내서에서는 클라이언트가 한 번만 수행해야 하는 수동 설정에 대해 설명합니다: GitHub secret을 추가합니다.
워크플로 파일에 대해, Lovable (Step 3)에 AI 지침을 복사-붙여넣습니다.
| pipeline의 작동 방식 | Step | What happens |
|---|---|---|
| 1 | 클라이언트 | Edits the app in Lovable and clicks 게시 |
| 2 | Lovable | GitHub (일반적으로 main) |
| 3 | GitHub Actions | npm ci, npm run build, bundle upload --auto-bump Capgo |
| 4 | Capgo | 활성화된 기기에서 업데이트를 받습니다. production SSH가 필요하지 않으며, __CAPGO_KEEP_0__이 필요하지 않으며, 비밀을 설정한 후 추가 클릭이 필요하지 않습니다. |
CLI
기본 조건
- GitHub이 사랑스러운 프로젝트와 연결된 경우__CAPGO_KEEP_0__ export 가이드)
- Capacitor +
@capgo/capacitor-updater리포지토리 (사랑스러운 프로젝트에서 모바일 가이드) - Capgo에 앱이 등록되어
capacitor.config.ts정확한 __CAPGO_KEEP_0__ 채널을指向하고appId production__CAPGO_KEEP_0__ 채널이 사용자들이 실행하는 빌드와 연결되어
왜 --auto-bump
Capgo 업로드가 필요할 때마다 새로운 유니크한 버전의 Capgo가 필요합니다 __CAPGO_KEEP_0__. Lovable Publish는 버전을 증가시키지 않습니다. package.json CI가 두 번째 배포에서 실패하는 것을 방지하기 위해, 동일한 버전을 재사용하는 경우.
--auto-bump 채널 (또는 앱)에서 최신 버전을 읽고 버전을 증가시킵니다. 기본 수준은 minor. 버전을 증가시키려면 --auto-bump patch 또는 --auto-bump major 만약 당신이 선호한다면.
Step 1 — Create a Capgo API key
- 열기 console.capgo.
- Create an API key with permission to upload bundles for your app
- 버전을 증가시키기 위해 앱에 대한 업로드 권한이 있는 키를 생성하세요.
이 키를 한 번 복사하세요. 다시 볼 수 없으므로.
Step 2 — Add CAPGO_TOKEN GitHub (단 하나의 환경 설정 단계)
이 단계는 Kuldeep과 저장소 소유자에게 보낼 단계입니다.
- GitHub 저장소 (Lovable이 동기화하는 저장소)를 열어보세요.
- Go to 설정 → 비밀 및 변수 → 액션
- Click 새 저장소 비밀
- 이름:
CAPGO_TOKEN - Capgo API 키 (Step 1에서 복사한 키)를 붙여넣으세요.
- 자동 저장
GitHub은 비밀 키를 워크플로우에 주입합니다. ${{ secrets.CAPGO_TOKEN }}워크플로우는 __CAPGO_KEEP_0__을 환경 변수로 읽습니다. CAPGO_TOKEN environment variable for the Capgo CLI.
저장소 소유자는 저장소에 비밀 키를 추가해야 합니다. 3단계 — Lovelable 채팅에 이 문구를 붙여넣습니다. repo. You only need the key in GitHub, not in Lovable settings.
Lovelable이 변경을 적용한 후,
__CAPGO_KEEP_1__ main__CAPGO_KEEP_1__ main __CAPGO_KEEP_1__
Add Capgo Live Updates CI with GitHub Actions.
Create `.github/workflows/capgo-live-updates.yml` (create folders if needed). Start from this YAML, then adapt install/build to this project while keeping Capgo upload + CAPGO_TOKEN secret behavior:
name: Capgo Live Updates
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- name: Install and build
run: |
npm ci
npm run build
- name: Upload bundle to Capgo
run: npx @capgo/cli@latest bundle upload --channel=production --auto-bump
env:
CAPGO_TOKEN: ${{ secrets.CAPGO_TOKEN }}
Rules:
- Do not hardcode any Capgo API key in the repo or in chat.
- The workflow must read CAPGO_TOKEN only from GitHub Actions secrets (`${{ secrets.CAPGO_TOKEN }}`).
- Keep `--auto-bump` on the upload command so each Publish gets a new unique bundle version.
- Prefer the project's real production build script from package.json (for example `npm run build` or `vite build`).
- If package-lock.json is missing, use `npm install` instead of `npm ci`.
- Do not modify app UI or Capacitor config for this task.
- Commit the workflow file so the next Publish pushes it to GitHub.
__CAPGO_KEEP_1__ 게시 이 워크플로가 GitHub에 도착하기까지
수동 대안
만약 Lovable 채팅을 사용하지 않으려면 .github/workflows/capgo-live-updates.yml 이 YAML만 사용하세요 (prompt 문구는 사용하지 마세요). 설치/빌드 단계를 위의 규칙과 같이 조정하세요. 프로젝트가 다르면 조정하세요, 그리고 커밋하고 푸시하세요.
name: Capgo Live Updates
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- name: Install and build
run: |
npm ci
npm run build
- name: Upload bundle to Capgo
run: npx @capgo/cli@latest bundle upload --channel=production --auto-bump
env:
CAPGO_TOKEN: ${{ secrets.CAPGO_TOKEN }}
Vite base 경로: Lovable Vite 앱은 종종 base: './' 에서 vite.config.ts 자연스러운 UI를 위해 base: './'white 화면이 나타나면 Lovable에게 다시
게시하고, 워크플로를 다시 배포하세요. 만약 __CAPGO_KEEP_0__ 암호화 Capgo 암호화사용한다면 CAPGO_PRIVATE_KEY GitHub를 두 번째 GitHub 비밀로 추가하고 업로드 단계에서 --key-data-v2 "${{ secrets.CAPGO_PRIVATE_KEY }}" __CAPGO_KEEP_0__에서
4단계 — Confirm Publish가 배포를
- 로블로블(Lovable)에서 작은 보이는 변경 사항을 만들자(예를 들어 버튼 레이블 텍스트)
- 을 클릭한다. __CAPGO_KEEP_0__에서
- On GitHub, open __CAPGO_KEEP_0__에서 Actions Capgo Live Updates
- __CAPGO_KEEP_0__ 콘솔 열기 Capgo 콘솔 __CAPGO_KEEP_0__ 채널
production__CAPGO_KEEP_0__ - __CAPGO_KEEP_1__
✅ __CAPGO_KEEP_0__ Publish in Lovable → green GitHub Action → new bundle in Capgo → users get the update.
증상
| 가능한 원인 | 수정 | 성공: |
|---|---|---|
| 워크플로우는 실행되지 않습니다. | 다른 branch로 푸시되었습니다. main |
변경 branches 워크플로우 또는 publish main |
CAPGO_TOKEN 인증 오류 |
비밀번호가 없거나 이름이 잘못되었습니다. | 비밀번호가 정확히 1개여야 합니다. CAPGO_TOKEN Actions secret |
| 버전이 이미 존재합니다. | 업로드는 동일한 버전의 패키지를 재사용했습니다. | __CAPGO_KEEP_0__ --auto-bump 업로드 단계 (또는 패스)에서 유지 --auto-bump patch) |
빌드 실패 npm ci |
Lockfile이 동기화되지 않음 | 실행 npm install 로컬에서 빌드, 커밋 package-lock.json, 다시 배포 |
| 업로드 성공, 화이트 스크린 | 오류 webDir 또는 Vite base |
출력과 일치하여 (Vite의 경우) 빌드 capacitor.config.ts webDir 사용자는 업데이트를 볼 수 없음dist __CAPGO_KEEP_0__ base: './' |
| __CAPGO_KEEP_0__ | 채널이 빌드에 연결되지 않았습니다. | Capgo에서 기기 빌드를 연결하거나 production 채널을 공개로 설정하십시오. |
더 많은 워크플로우 패턴(기능 branch, PR 채널, 암호화) 보기 GitHub Actions 통합.
고객에게 말하는 것
클라이언트에게 이 체크리스트를 보내십시오.
- 당신 이미 Lovable을 GitHub에 연결하고 Capgo을 모바일 앱에 설정했습니다.
- 그들은 1개의 GitHub 시크릿을 추가하십시오:
CAPGO_TOKEN그들의 Capgo API 키 (API키 페이지). - 그들은 클릭 Lovable에서 언제든지 사용자가 변경 사항을 받기를 원할 때 __CAPGO_KEEP_0__ 버튼을 클릭합니다. 그들은 __CAPGO_KEEP_1__에서 __CAPGO_KEEP_0__을 실행하지 않습니다.
- 그것은 사용자가 요청한 단일 클릭 경험과 일치합니다: Lovable에서 __CAPGO_KEEP_0__ 버튼을 클릭하면 __CAPGO_KEEP_1__이 나머지 작업을 처리합니다.
npx @capgo/cli계속
That matches the single-click experience they asked for: Publish in Lovable is the button; GitHub Actions and Capgo handle the rest.
— __CAPGO_KEEP_0__ + __CAPGO_KEEP_1__ 설정이 완전한 __CAPGO_KEEP_0__ + __CAPGO_KEEP_1__ 설정입니다. 앱을 wrap하지 않았으면
- 자동 빌드 및 릴리즈와 __CAPGO_KEEP_0__ Actions — Full Capacitor + Capgo setup if you have not wrapped the app yet
- Automatic build and release with GitHub Actions — 태그 기반 릴리스 및 버전 업데이트
- GitHub GitHub Actions 통합 — 다중 채널 및 PR 미리보기 채널
- Capgo 실시간 업데이트 — 채널, 롤백 및 수용 통계