Code Recap can deploy generated HTML reports to various providers for sharing with clients.
| Provider | Description | Requirements |
|---|---|---|
zip |
Creates a zip file for manual sharing | None |
s3 |
Deploys to AWS S3 | AWS CLI |
cloudflare |
Deploys to Cloudflare Pages | Node.js, wrangler CLI |
# Deploy a specific client
code-recap deploy --client acme --provider zip
code-recap deploy --client acme --provider s3
code-recap deploy --client "Beta Inc" --provider cloudflare
# Deploy all clients
code-recap deploy --all --provider zip
# List available providers
code-recap deploy --list-providersConfigure providers in your config.yaml:
deploy:
providers:
zip:
output_dir: "output/zips"
s3:
bucket: "my-reports-bucket" # Or use S3_BUCKET env var
region: "us-east-1" # Or use AWS_REGION env var
prefix: "" # Optional path prefix
cloudflare:
project_prefix: "reports"
account_id: ""
api_token: ""
access_emails:
- "admin@company.example"Deploys reports to an S3 bucket using the AWS CLI.
-
Install AWS CLI:
pip install awscli # or uv pip install awscli -
Configure credentials:
aws configure # Enter your AWS Access Key ID, Secret Access Key, and region -
Create an S3 bucket (if needed):
aws s3 mb s3://my-reports-bucket --region us-east-1
-
Configure in
config.yamlor environment:deploy: providers: s3: bucket: "my-reports-bucket" region: "us-east-1"
Or via environment variables:
export S3_BUCKET="my-reports-bucket" export AWS_REGION="us-east-1"
-
Deploy:
code-recap deploy --client acme --provider s3
To make reports publicly accessible via a web URL:
- Enable static website hosting on your bucket
- Configure bucket policy for public read access (or use CloudFront)
- Reports will be available at:
https://{bucket}.s3.{region}.amazonaws.com/{client}/index.html
For better performance and custom domains:
- Create a CloudFront distribution pointing to your S3 bucket
- Configure your custom domain
- Use Origin Access Control (OAC) to keep the bucket private
Configure custom URLs (e.g., CloudFront domains) per client:
html_report:
clients:
"Acme Corp":
deploy:
s3:
url: "https://reports.acme.example/acme_corp/index.html"This URL is displayed after deployment instead of the default S3 URL.
Deploys to Cloudflare Pages with optional Access control.
-
Install wrangler (or use via npx):
npm install -g wrangler
-
Authenticate:
wrangler login
-
Deploy:
code-recap deploy --client acme --provider cloudflare
The provider automatically creates Projects if they don't exist.
To restrict report access to specific email addresses:
- Create an API token at Cloudflare Dashboard
- Grant permission:
Account > Access: Organizations, Identity Providers, and Groups > Edit - Set the token:
export CLOUDFLARE_API_TOKEN='your-token' # Or add to config.yaml under deploy.providers.cloudflare.api_token
- Configure allowed emails in
config.yaml(global and/or per-client)
Configure client-specific Cloudflare settings in the html_report.clients section:
html_report:
clients:
"Acme Corp":
deploy:
cloudflare:
project_name: "acme-dev-reports" # Full name (ignores prefix)
access_emails: # Additional emails for this client
- "cto@acme-corp.example"
- "pm@acme-corp.example"Creates timestamped zip files for manual distribution:
code-recap deploy --client acme --provider zip
# Creates: output/zips/Acme-Report-2025-01-15.zipThe zip contains all HTML files for that client's report.
You can install third-party providers or create your own. Plugins are automatically discovered when installed alongside Code Recap.
code-recap deploy --list-providers
# Output:
# cloudflare
# s3
# zip
# my-custom-provider (plugin)See the Extending Guide for how to create custom deployment providers.