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

CI/CD

Automate Press.js Cloud deploys in your CI/CD pipeline. The cloud CLI is a single native binary with no runtime dependencies — ideal for CI environments.

The cloud CLI is published as a standalone binary for each release. Download the archive for your platform, extract it, and use it directly.

Terminal window
# Linux x86_64
curl -OL https://github.com/press-js/press-cloud-cli/releases/latest/download/press-cloud-cli-0.1.0-x86_64-unknown-linux-gnu.tar.gz
tar -xzf press-cloud-cli-0.1.0-x86_64-unknown-linux-gnu.tar.gz
./press-cloud-cli --version
PlatformArchive
Linux x86_64press-cloud-cli-{version}-x86_64-unknown-linux-gnu.tar.gz
Linux ARM64press-cloud-cli-{version}-aarch64-unknown-linux-gnu.tar.gz
macOS x86_64press-cloud-cli-{version}-x86_64-apple-darwin.tar.gz
macOS ARM64press-cloud-cli-{version}-aarch64-apple-darwin.tar.gz
Windows x86_64press-cloud-cli-{version}-x86_64-pc-windows-msvc.zip
Windows ARM64press-cloud-cli-{version}-aarch64-pc-windows-msvc.zip

Each release also includes a SHA256SUMS file to verify integrity.

Replace latest/download with a specific tag to pin a version:

Terminal window
curl -OL https://github.com/press-js/press-cloud-cli/releases/download/v0.1.0/press-cloud-cli-0.1.0-x86_64-unknown-linux-gnu.tar.gz

Create an API key from the Press.js Cloud dashboard, then store it as a secret in your CI platform.

The cloud CLI authenticates via the PRESS_CLOUD_TOKEN environment variable:

Terminal window
export PRESS_CLOUD_TOKEN=pcak_xxxxx
./press-cloud-cli deploy --entry my-report --artifact-path ./dist --route / --title "My Report"
name: Deploy to Press.js Cloud
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download cloud CLI
run: |
curl -OL https://github.com/press-js/press-cloud-cli/releases/latest/download/press-cloud-cli-0.1.0-x86_64-unknown-linux-gnu.tar.gz
tar -xzf press-cloud-cli-0.1.0-x86_64-unknown-linux-gnu.tar.gz
- name: Deploy
run: ./press-cloud-cli deploy --entry report --artifact-path ./dist
env:
PRESS_CLOUD_TOKEN: ${{ secrets.PRESS_CLOUD_TOKEN }}
deploy:
image: ubuntu:22.04
before_script:
- apt-get update && apt-get install -y curl
- curl -OL https://github.com/press-js/press-cloud-cli/releases/latest/download/press-cloud-cli-0.1.0-x86_64-unknown-linux-gnu.tar.gz
- tar -xzf press-cloud-cli-0.1.0-x86_64-unknown-linux-gnu.tar.gz
script:
- ./press-cloud-cli deploy --entry report --artifact-path ./dist
variables:
PRESS_CLOUD_TOKEN: $PRESS_CLOUD_TOKEN
only:
- main

Use different slugs per branch for preview deployments:

- name: Deploy
run: ./press-cloud-cli deploy --entry report --artifact-path ./dist --slug "preview-${GITHUB_HEAD_REF:-main}"
env:
PRESS_CLOUD_TOKEN: ${{ secrets.PRESS_CLOUD_TOKEN }}

This creates separate deploys for each branch — useful for review workflows.

If you already use the press CLI and have Node.js in your CI environment, you can install and use the cloud CLI through it:

- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npm install --global @press-js/cli
- name: Install cloud CLI
run: press install cloud
- name: Deploy
run: press deploy report --slug my-report
env:
PRESS_CLOUD_TOKEN: ${{ secrets.PRESS_CLOUD_TOKEN }}

The press CLI handles the build step and parameter parsing from press.toml automatically.

  • Never commit API keys — always use your CI platform’s secret store
  • Pin a specific version in production pipelines to prevent unexpected changes from new releases
  • Verify checksums using the SHA256SUMS file from the release
  • Install the cloud CLI once per pipeline — the binary is stateless and fully self-contained