Deploy from CI (GitHub Actions)
Push to deploy — preview per PR, production on main. No private key in the repo.
npx chainship init --ci
This writes .github/workflows/chainship.yml. Then:
npx chainship login --email you@example.com(if you haven't)- Mint an API token in the dashboard → Settings
gh secret set CHAINSHIP_TOKEN(or add it in the repo settings)- Push. Each deploy, previews included, is permanent and paid from the account's credits
The core of the generated workflow:
- uses: actions/setup-node@v4
with: { node-version: "20" }
- name: Deploy
env:
CHAINSHIP_TOKEN: ${{ secrets.CHAINSHIP_TOKEN }}
run: npx --yes chainship@latest deploy --managed --network mainnet --slug "$SLUG" --json-out chainship-result.json
Behavior:
- Pull request → a permanent preview under its own named URL (
<repo>-pr-<n>); the URL is posted as a PR comment. - Push to main → production deploy under
<repo>.
Scope: the managed path moves your named URL (/s/<slug>). It does not write the
ENS pointer — that needs the self-funded path with a funded key. The workflow's trailing
comment shows that variant. The CLI is run via npx chainship (see the CLI).