Deploy to Specra Cloud

Deploy your documentation to Specra Cloud with a single command

Deploy to Specra Cloud

Specra Cloud is the easiest way to deploy your documentation. One command and your docs are live with automatic HTTPS, custom subdomains, and built-in analytics.

Why Specra Cloud?

  • One-command deployspecra deploy handles everything
  • Automatic HTTPS — SSL certificates provisioned automatically
  • Custom subdomainsyour-project.docs.specra-docs.com out of the box
  • Built-in analytics — Page views, visitors, and engagement metrics
  • Feedback widgets — Collect user feedback directly from your docs
  • Managed infrastructure — No servers, no Docker, no CI/CD to configure

Prerequisites

You need:

  1. A Specra account at specra-docs.com
  2. An active subscription (Starter plan or above)
  3. Node.js 18+ installed locally

Quick Deploy

Install the Specra CLI

Code
bash
1npm install -g specra-cli

Or use npx without installing:

Code
bash
1npx specra-cli deploy

Generate an API Token

  1. Log in to your Specra dashboard
  2. Go to Settings > API Tokens
  3. Click Generate Token
  4. Copy the token — you'll only see it once

Authenticate the CLI

Run the login command and paste your token when prompted:
Code
bash
1specra login
The token is saved to `~/.specra/config.json`:
Code
json
1{
2 "token": "your-api-token-here"
3}
Tip
You can also set the token via the `SPECRA_TOKEN` environment variable for CI/CD pipelines.

Deploy

From your documentation project directory:
Code
bash
1specra deploy
The CLI will:
1. Read your `specra.config.json`
2. Build your project
3. Upload the build output
4. Deploy to your subdomain

You'll get a live URL like `your-project.docs.specra-docs.com`.
Success
That's it! Your documentation is live with automatic HTTPS, analytics, and a custom subdomain.

Configuration

The CLI reads your specra.config.json for project settings. No additional configuration files are needed.

CLI Options

Code
bash
1specra deploy [options]
2 
3Options:
4 --name <name> Override the project name
5 --token <token> Use a specific API token (overrides saved token)
6 --dry-run Build without deploying
7 -h, --help Show help

Environment Variables

For CI/CD environments, use environment variables instead of interactive login:

Code
bash
1SPECRA_TOKEN=your-api-token specra deploy

Custom Domains

Automatic Subdomain

Every project gets a subdomain automatically:

your-project.docs.specra-docs.com

The subdomain is derived from your project name.

Custom Domain

To use your own domain (e.g., docs.yoursite.com):

Add Domain in Dashboard

  1. Go to your project in the Specra dashboard
  2. Navigate to Settings > Custom Domain
  3. Enter your domain (e.g., docs.yoursite.com)
  4. Click Save

Configure DNS

Add a CNAME record at your DNS provider:
Type: CNAME
Name: docs
Value: docs.specra-docs.com

Wait for SSL

Specra automatically provisions an SSL certificate once DNS is verified. This usually takes a few minutes.

CI/CD Integration

GitHub Actions

Automate deployments on every push to main:

Code
yaml
1name: Deploy Docs
2 
3on:
4 push:
5 branches: [main]
6 
7jobs:
8 deploy:
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v4
12 
13 - name: Setup Node.js
14 uses: actions/setup-node@v4
15 with:
16 node-version: '20'
17 cache: 'npm'
18 
19 - name: Install dependencies
20 run: npm ci
21 
22 - name: Install Specra CLI
23 run: npm install -g specra-cli
24 
25 - name: Deploy
26 run: specra deploy
27 env:
28 SPECRA_TOKEN: ${{ secrets.SPECRA_TOKEN }}

GitLab CI/CD

Code
yaml
1deploy-docs:
2 image: node:20
3 stage: deploy
4 script:
5 - npm ci
6 - npm install -g specra-cli
7 - specra deploy
8 variables:
9 SPECRA_TOKEN: $SPECRA_TOKEN
10 only:
11 - main

Troubleshooting

Authentication Failed

  • Verify your token is correct in ~/.specra/config.json
  • Generate a new token from the dashboard if the old one expired
  • Check that your subscription is active

Deploy Fails

  1. Ensure your project builds locally:
Code
bash
1npm run build
  1. Check Node.js version:
Code
bash
1node --version # Should be 18+
  1. Verify specra.config.json exists in your project root

Custom Domain Not Working

  • Verify the CNAME record points to docs.specra-docs.com
  • Wait for DNS propagation (can take up to 48 hours, usually under an hour)
  • Check the domain status in your Specra dashboard

Next Steps