Copy to GitHub and deploy from Actions
Keep a copy of every published version in a repository, or build and deploy on your own GitHub Actions.
Which one you want
- Copy to GitHub keeps a record of what you publish. Use it when the site lives in Benchy, for example a Starter you edit in Desktop.
- Deploy from GitHub Actions publishes from your repository. Use it when your source already lives on GitHub and you want every push to main to go live.
Pick one per website. Both go one way only: Benchy never reads changes back from GitHub, and never merges.
Copy to GitHub
- Connect GitHub in the workspace’s Connections, if nobody has yet.
- On the website’s page, under Settings, choose Copy to GitHub. Pick the account or organization and a name; Benchy creates a private repository there. You can also pick an empty repository you already have.
- From then on, every version that goes live becomes one commit: the files visitors get, with the version, who published it and how in the commit message.
- Don’t edit the files Benchy writes; the next version replaces them. Keep your own notes in other branches.
- Stop copying leaves the repository and its history as they are.
- A rollback is a new commit with the older files, so the history stays in order.
Deploy from GitHub Actions
The build runs on your repository’s Actions minutes, never on Benchy. On the website’s page, under Settings, choose Deploy from GitHub Actions. Benchy creates an API key that can only publish this website and shows the workflow to add.
- Save the key as a repository secret named
BENCHY_SITE_KEY. - Add the workflow as
.github/workflows/benchy-site.yml, with your build command and output folder.
When GitHub is connected, Add to repository does both for you, in a pull request you merge.
name: Deploy to benchy.site
on:
push:
branches: [main]
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm run build
- run: npx --yes @benchystudio/cli site deploy dist --site olive-prints $PREVIEW
env:
BENCHY_PAT: ${{ secrets.BENCHY_SITE_KEY }}
PREVIEW: ${{ github.event_name == 'pull_request' && '--preview' || '' }}The website’s history names the key for each version, so you can tell Actions deploys from others. Revoke the key in Profile, then API keys, to stop them at once.
Previews for pull requests
The workflow above publishes a preview for every pull request and prints its address in the job’s log. Pushes to main go live. Previews last 7 days, like any other.
Use ← and → to move between pages.