Skip to content
Press.js Press.js Press.js Docs

Deploy

Deploying a document sends your built web app to Press.js Cloud for rendering and hosting.

The deploy pipeline has three stages:

press deploy report

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 = 15000

If the entry has a build command, it runs before deployment (unless --no-build is passed).

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 command is unique among cloud commands — it has a two-phase bridge:

PhaseComponentWhat it does
Config + Buildpress CLI (@press-js/cli)Reads press.toml, selects entry, runs build command
Upload + Deploypress-cloud-cliUploads 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.

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:

Terminal window
press render report --remote

To keep the deploy version, pass --save-version and target a deploy:

Terminal window
press render report --remote --save-version --slug team-report

Remote render also forwards cloud flags such as --token, --api-base, --deploy-id, --slug, and --name.

The deploy command supports both interactive login and API keys:

Terminal window
# With API key (CI/CD, automation)
press deploy report --token pcak_xxxxx
# Or via environment variable
export PRESS_CLOUD_TOKEN=pcak_xxxxx
press deploy report

See Authentication for details.

VariableDescription
PRESS_CLOUD_TOKENAPI key for automated authentication
PRESSJS_RENDER_DEBUGPreserve render debug logs ("1", "true", "yes", "on")
PRESSJS_CLOUD_INSTALL_DIRCloud CLI install directory override