Deploy
Deploying a document sends your built web app to Press.js Cloud for rendering and hosting.
How it works
Section titled “How it works”The deploy pipeline has three stages:
press deploy report1. Configuration (press CLI)
Section titled “1. Configuration (press CLI)”The press CLI reads press.toml, selects the named entry, and resolves paths:
[pdf.report]path = "./dist"route = "/"output = "./artifacts/report.pdf"title = "My Report"build = "npm run build"timeout_ms = 150002. Build (press CLI)
Section titled “2. Build (press CLI)”If the entry has a build command, it runs before deployment (unless --no-build is passed).
3. Handoff (cloud CLI)
Section titled “3. Handoff (cloud CLI)”The press CLI hands off the resolved information to the cloud binary:
- Entry name, artifact path, route, title
- Render timeout
- Any additional flags (e.g.,
--slug,--deploy-id,--name)
The cloud binary uploads the artifacts and triggers cloud rendering.
The deploy bridge
Section titled “The deploy bridge”The deploy command is unique among cloud commands — it has a two-phase bridge:
| Phase | Component | What it does |
|---|---|---|
| Config + Build | press CLI (@press-js/cli) | Reads press.toml, selects entry, runs build command |
| Upload + Deploy | press-cloud-cli | Uploads artifacts, communicates with Press.js Cloud API |
All other cloud commands (login, logout, whoami, deploys) are pure passthrough — the press CLI forwards them directly to the cloud binary.
Remote render bridge
Section titled “Remote render bridge”press render --remote reuses the same bridge instead of introducing a separate cloud binary command. The press CLI reads press.toml, runs the build, resolves output/--out and timeout_ms/--timeout, then invokes the installed press-cloud-cli deploy with the resolved artifact path and render metadata.
By default, remote render creates a generated temporary slug and deletes that deploy after the cloud command succeeds:
press render report --remoteTo keep the deploy version, pass --save-version and target a deploy:
press render report --remote --save-version --slug team-reportRemote render also forwards cloud flags such as --token, --api-base, --deploy-id, --slug, and --name.
Authentication
Section titled “Authentication”The deploy command supports both interactive login and API keys:
# With API key (CI/CD, automation)press deploy report --token pcak_xxxxx
# Or via environment variableexport PRESS_CLOUD_TOKEN=pcak_xxxxxpress deploy reportSee Authentication for details.
Environment variables
Section titled “Environment variables”| Variable | Description |
|---|---|
PRESS_CLOUD_TOKEN | API key for automated authentication |
PRESSJS_RENDER_DEBUG | Preserve render debug logs ("1", "true", "yes", "on") |
PRESSJS_CLOUD_INSTALL_DIR | Cloud CLI install directory override |
See also
Section titled “See also”- Quickstart — deploy your first PDF in 5 minutes
- Managing Deploys — manage deploys, versions, and aliases
- Authentication — login and API keys for CI/CD
- CI/CD — automate deploys in your pipeline
- Installation — install the cloud CLI
- press.toml Reference — configure document entries
- Environment Variables — full env var reference