Skip to content

In CI

In a build or CI job there’s no one to approve a sign-in, so the CLI uses an API key instead.

  1. In the app, go to Settings, then API keys. Choose the site, and under It can, leave only Read forms ticked. Make the key and copy it.
  2. Set it as SEAFORMS_API_KEY, a secret in your CI or your host’s build settings.
  3. Commit seaforms.json, so the CLI knows the site. A key made for one site works without it too.
  4. Run npx seaforms pull before your build.
.github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npx seaforms pull
env:
SEAFORMS_API_KEY: ${{ secrets.SEAFORMS_API_KEY }}
- run: npm ci && npm run build
  • login and logout refuse while the key is set, so a CI job never waits on a sign-in.
  • The key goes only to Seaforms over https. One sent to another server (with --api) says so in the log.
  • Nothing else is needed: pull writes the files and their types, then your build reads them as it would on your computer.
Was this helpful?

Your answer goes straight to the person who wrote it.

Thanks. We read every note and update the article.

Thanks, that helps us keep these useful.

ChatGPT is a trademark of OpenAI, and Claude and Claude Code are trademarks of Anthropic. Other product names and logos belong to their owners. None of them makes or endorses Seaforms. Trademarks