Remote builds

By default Sarcio builds a code fix for you. With remote builds, your own CI/CD pipeline builds it and uploads the result. Optional, per site.

  1. Create a build token

    On the API tokens tab, create a token with only the builds:write scope. Store it in your CI as the secret SARCIO_API_TOKEN.

  2. Add the pipeline

    One command, sarcio-remote-build, builds from the pipeline's own checkout and uploads the result.

    .github/workflows/sarcio-build.yml

    # .github/workflows/sarcio-build.ymlname: sarcio-buildon:  workflow_dispatch:    inputs:      sarcio_build_id: { required: true }jobs:  build:    runs-on: ubuntu-latest    steps:      - uses: actions/checkout@v4      - uses: actions/setup-node@v4        with: { node-version: 24 }      - run: npm i -g @sarcio/build-pipeline      - run: sarcio-remote-build        env:          SARCIO_API_BASE: https://control.sarcio.io          SARCIO_BUILD_ID: ${{ inputs.sarcio_build_id }}          SARCIO_API_TOKEN: ${{ secrets.SARCIO_API_TOKEN }}          SARCIO_CI_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

    .gitlab-ci.yml

    # .gitlab-ci.ymlsarcio-build:  rules:    - if: $SARCIO_BUILD_ID  image: node:24  script:    - npm i -g @sarcio/build-pipeline    - sarcio-remote-build  variables:    SARCIO_API_BASE: https://control.sarcio.io    SARCIO_CI_RUN_URL: $CI_PIPELINE_URL    # SARCIO_API_TOKEN comes from a masked CI/CD variable

    On Bitbucket, run the same two commands in a custom pipeline.

  3. Turn it on for the site

    Under Sites → Manage → Remote builds, enable remote builds and name the pipeline: the GitHub workflow file (sarcio-build.yml) or the Bitbucket custom pipeline. GitLab has one pipeline, so any name works.

What changes

Sarcio no longer clones or builds your repository. It still reads the source files it needs through your Git host to draft the fix. The uploaded build is checked, then lands as a normal draft that a reviewer must approve. If a build fails, the report page says so.

Ready to try it on your own site?

Create a workspace, add a site, and follow these steps on your own app.

Create a workspace