deeep sync by hand: a changed component shows Comparing…, then its new result a few minutes later.
The build runs on your repository’s GitHub Actions, which already has your code and dependencies. deeepSpace sets it up for you, and you can pause or remove it from deeepSpace at any time.
Before you begin
- The project is connected to a GitHub repository in deeepSpace. For GitLab, Bitbucket or another CI service, see Set it up yourself.
- You have run
deeep synconce from your machine (or committeddeeep.json), so deeepSpace knows how to find your components. - You are an owner or creator of the project’s workspace, and an admin of the GitHub repository. Adding a secret and a workflow needs repository admin rights.
Turn it on
1
Flip the switch
In deeepSpace, open the project’s settings → Automation, and turn on Automatic comparisons.
2
Allow workflows on GitHub (once)
The first time, GitHub asks you to allow deeepSpace to update GitHub Action workflows. Select Authorize: you come back to the same tab, and the setup carries on.
3
Merge the pull request
deeepSpace opens a pull request in your repository that adds
.github/workflows/deeep.yml, plus deeep.json when the repository doesn’t have it yet. Select Open the pull request and merge it on GitHub.DEEEP_TOKEN secret. You never see or copy it.
Pause, resume or remove it
- Pause: turn the switch off. Pushes aren’t compared; nothing changes on GitHub. Each run checks deeepSpace first and ends in seconds, green.
- Resume: turn the switch on again. The next push is compared.
- Remove from repository: revokes the token, deletes the
DEEEP_TOKENsecret and opens a pull request that removes the workflow. Merge it to take the file out.
Set it up yourself
For another CI service, or to set up GitHub Actions by hand, use Automation → Set it up yourself.1
Create a CI token
Name the token (for example GitHub Actions) and select Create token. Copy it: it’s shown only once.
2
Add it to the repository as a secret
On GitHub, open the repository’s Settings → Secrets and variables → Actions → New repository secret. Name it
DEEEP_TOKEN and paste the token.3
Add the workflow
Commit this file as
.github/workflows/deeep.yml, along with deeep.json. The tab gives it with your project’s branch and the latest CLI release filled in, for npm, pnpm, Yarn or Bun..github/workflows/deeep.yml
Other CI services
Any CI service works. In the job:- Check out the repository (a branch, not a detached commit) and install your dependencies.
- Install one CLI release and check its SHA-256 before running it. Take the version and checksum from the workflow in Automation → Set it up yourself (the build for Linux x86_64):
- Run
deeep syncwithDEEEP_TOKENset from the service’s secret variables.
Keep the workflow up to date
The workflow installs one exact release of the deeep CLI and checks its SHA-256 before running it, so a run never picks up a new version by itself. Its actions are pinned to exact commits too. When a newer CLI is out, or deeepSpace’s workflow changes, Automation shows the update before you decide:- What changes for you, in plain words, and what stays the same (your
DEEEP_TOKENsecret, the branch, when it runs). - A Security fix or Recommended label.
- See the exact file changes: the lines of
.github/workflows/deeep.ymlthat are removed and added.
What a run does
- Asks deeepSpace whether automatic comparisons are paused (
deeep ci check). If they are, the run ends there, green. - Syncs the components found in the commit that was pushed.
- With Storybook discovery, builds Storybook first: a fresh checkout has no build. That’s why the workflow installs your dependencies before
deeep sync. - Builds the component previews and starts the design comparison. Components that didn’t change keep their results.
deeep.json, a Storybook build that fails). Problems with Storybook hosting or the design comparison don’t fail it, since your components were synced, but they show as warnings on the run’s summary page.
How a CI token is kept safe
- It works only for its project, and only for what a sync does: reading the project’s details, syncing components, updating the project’s stack settings and uploading builds. It can’t read other projects, the workspace’s members, your account, or manage tokens.
- It acts as the member who created it: if they leave the workspace, are no longer an owner or creator, or their account is blocked or deleted, the token stops working. Create a new one from another member’s account.
- Signing out or changing your password doesn’t end a CI token, as with tokens on other services: revoke it if it may have leaked.
- Only a fingerprint of it is stored: deeepSpace can’t show it again. Automation → Set it up yourself lists each token with who created it and when it was last used.
- Revoke a token you no longer use, or one that may have leaked. Runs using it stop at once.
- A read-only workspace (trial ended, subscription canceled) refuses CI runs, like other CLI use.
Troubleshooting
”GitHub permission needed”
deeepSpace can’t add workflow files yet. Select Allow on GitHub and authorize it.”A repository admin is needed”
Only a repository admin can add the secret and the workflow. Ask one to turn automatic comparisons on, or to give you admin rights.”Run deeep sync once from your machine first”
deeepSpace doesn’t know your component setup yet. Rundeeep init and deeep sync once, then turn it on again.
”The pull request was closed without merging it”
Turn automatic comparisons on again to open a new one.The run stops at “Install the deeep CLI” with “checksum did NOT match”
The downloaded file isn’t the release the workflow names, so it isn’t run. Run the workflow again. If it fails again, select Update the workflow in Automation, or copy the workflow from Set it up yourself again.The run ends at “Check deeepSpace”
Automatic comparisons are paused. Turn the switch on in Automation.”deeepSpace refused the CI token”
The token was revoked or doesn’t exist. Create a new one in Automation and update theDEEEP_TOKEN secret.
”DEEEP_TOKEN isn’t a deeepSpace CI token”
The secret holds something else. CI tokens start withdeeep_ci_.
”Authentication required: Set DEEEP_TOKEN”
The secret isn’t passed to the step. Check theenv: block and the secret’s name.
”No project linked”
deeep.json isn’t in the commit. Run deeep init on your machine and commit deeep.json.
”This CI token belongs to another project”
deeep.json links another project than the token’s. Use the token of the project in deeep.json.
”Storybook’s dependencies aren’t installed”
Install your dependencies in a step beforedeeep sync.
”The repository is in detached HEAD state”
Check out a branch:actions/checkout does on a push. Other services may need git checkout <branch> first.