Skip to content

Public-repo hosted CI (free Actions minutes) ​

PR CI (test + Hub smoke (demo)) can run on GitHub-hosted runners in the public orchestrator repo (marklovely/lovely-hub-provision) so work does not queue on the VPS. The private repo only runs a thin dispatch job on lovely-home (~seconds).

Billing: workflow files live in the public repo → no private-repo Actions minutes for the heavy jobs. You still pay for the VPS dispatch job (self-hosted = $0 GitHub minutes).

Which token is which? ​

GitHub shows PAT names under Developer settings. Actions uses repository secret names. They are not the same thing — you copy the PAT value into the secret once.

Your fine-grained PAT (settings label)Stored as secret onRepoPAT permissions (resource)
PUBLIC_CI_DISPATCH_TOKENPUBLIC_CI_DISPATCH_TOKENhome-dashboard (private)lovely-hub-provision: Actions Read and write
HOME_DASHBOARD_DISPATCH_TOKENHOME_DASHBOARD_DISPATCH_TOKENlovely-hub-provision (public)home-dashboard: Contents Read, Commit statuses Read and write

You only need those two PATs for hosted PR CI. Ignore HOME_DASHBOARD_CHECKS_TOKEN (removed from the workflow). Do not use PLATFORM_GITHUB_TOKEN for this path unless it has the same scopes as the dispatch PAT above.

mermaid
flowchart LR
  subgraph private["home-dashboard"]
    VPS[VPS dispatch job]
    S1[PUBLIC_CI_DISPATCH_TOKEN]
  end
  subgraph public["lovely-hub-provision"]
    WH[hub-ci-dispatch.yml]
    S2[HOME_DASHBOARD_DISPATCH_TOKEN]
  end
  VPS -->|workflow_dispatch| WH
  S1 -.-> VPS
  S2 -.-> WH
  WH -->|checkout + commit statuses| HD[(home-dashboard @ PR SHA)]

Architecture ​

mermaid
sequenceDiagram
  participant PR as home-dashboard PR
  participant VPS as lovely-home runner
  participant Pub as lovely-hub-provision
  participant GH as ubuntu-latest

  PR->>VPS: ci.yml dispatch-hosted-ci
  VPS->>Pub: workflow_dispatch hub-ci-dispatch.yml
  Pub->>GH: test + hub-smoke jobs
  GH->>PR: Commit statuses (test, Hub smoke)

Required branch protection checks stay test and Hub smoke (demo) — the public workflow posts those status contexts on the PR commit SHA. It also posts Hub visual and Site checks (marketing + account pages against the real platform code run locally, npm run test:site, #1108); add them to branch protection if you want them required.

One-time setup ​

1. Public repo workflow ​

In marklovely/lovely-hub-provision, .github/workflows/hub-ci-dispatch.yml on main.

bash
node scripts/sync-public-ci-workflow.mjs --repo marklovely/lovely-hub-provision

2. Secrets on the public repo (lovely-hub-provision) ​

SecretValue
HOME_DASHBOARD_REPOmarklovely/home-dashboard
HOME_DASHBOARD_DISPATCH_TOKENPAT HOME_DASHBOARD_DISPATCH_TOKEN (Contents read + Commit statuses read/write on private repo)
bash
gh secret set HOME_DASHBOARD_DISPATCH_TOKEN --repo marklovely/lovely-hub-provision
gh secret set HOME_DASHBOARD_REPO --body 'marklovely/home-dashboard' --repo marklovely/lovely-hub-provision

3. Secret on the private repo (home-dashboard) ​

SecretValue
PUBLIC_CI_DISPATCH_TOKENPAT PUBLIC_CI_DISPATCH_TOKEN (Actions write on public repo)
bash
gh secret set PUBLIC_CI_DISPATCH_TOKEN --repo marklovely/home-dashboard

Optional repo variable PUBLIC_CI_REPO (default marklovely/lovely-hub-provision).

4. Merge private-repo changes ​

Ensure main includes thin .github/workflows/ci.yml, .github/actions/monorepo-ci, and scripts/dispatch-public-hub-ci.mjs, scripts/run-private-ci-check.mjs.

Rollback (VPS-only CI) ​

Unset PUBLIC_CI_DISPATCH_TOKEN on the private repo and restore the previous ci.yml jobs on lovely-home from git history.