Skip to content

CI/CD

ShipNode generates a ready-to-use GitHub Actions workflow.

Terminal window
npx shipnode ci github

This writes .github/workflows/deploy.yml that:

  1. Checks out the repo
  2. Installs deps with your package manager
  3. Sets up SSH using a secret deploy key
  4. Runs npx shipnode deploy

The workflow expects the following GitHub repository secrets:

SecretPurpose
SHIPNODE_SSH_KEYPrivate key for the deploy user.
SHIPNODE_SSH_HOSTServer hostname (matches shipnode.config.ts).
SHIPNODE_ENVThe full .env contents to materialize on the runner.

Sync the env automatically:

Terminal window
npx shipnode ci env-sync --all

Duplicate the workflow file (e.g. deploy-staging.yml) and pass --config shipnode.staging.config.ts to the deploy step.