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.
- 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.
- Set it as
SEAFORMS_API_KEY, a secret in your CI or your host’s build settings. - Commit
seaforms.json, so the CLI knows the site. A key made for one site works without it too. - Run
npx seaforms pullbefore your build.
name: Deployon: 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 buildloginandlogoutrefuse 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:
pullwrites the files and their types, then your build reads them as it would on your computer.
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