# Other CI systems

Upload from Bitrise or another CI with explicit commit metadata.

## Start with a project token
Create or rotate an upload token in the project's settings. Store it as a masked CI secret named `FRAMECHECK_TOKEN`. Set `FRAMECHECK_API_URL` to `https://api.framecheck.dev` and copy `FRAMECHECK_PROJECT_ID` from Setup.

Build the same commit that you report to Framecheck. Use Node 24 for the uploader and the pinned download and checksum from [CLI installation](/cli/).

## Upload a branch build
The example assumes you have downloaded `framecheck.mjs` and your CI supplies `COMMIT_SHA` and `BRANCH_NAME`. Replace the repository and build command with your own values.

```sh
npm ci
npm run build-storybook -- --stats-json
node framecheck.mjs upload \
  --storybook-dir storybook-static \
  --repository example/design-system \
  --commit "$COMMIT_SHA" \
  --branch "$BRANCH_NAME" \
  --trigger branch
```

Set `FRAMECHECK_TOKEN` through your CI's secret configuration, not in the command or a committed file. The uploaded directory must contain the static Storybook build, not the source directory.

## Upload a pull request
Pass the pull-request number, base branch, and actual merge-base commit. `MERGE_BASE_SHA` is the common ancestor of the head and base branches, not simply the current tip of the base branch.

```sh
node framecheck.mjs upload \
  --storybook-dir storybook-static \
  --repository example/design-system \
  --commit "$COMMIT_SHA" \
  --branch "$BRANCH_NAME" \
  --trigger pull_request \
  --pr "$PR_NUMBER" \
  --pr-base-branch "$BASE_BRANCH" \
  --merge-base "$MERGE_BASE_SHA"
```

If calculating the merge base with Git, fetch enough history for `git merge-base` to find it. A shallow checkout can be insufficient.

## Read the outcome
The uploader prints a review link and exits once the upload has been accepted for processing. It does not wait for visual approval. Keep the GitHub App connected so Framecheck can publish the final check to the commit.

## Native CI
For native apps, the Setup page can generate a GitHub Actions workflow, a Bitrise Script step, or a shell snippet for another CI. Build the capture app before the upload step. See [native CI](/native-ci/) for artifact and platform details.
