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 deploy —
specra deployhandles everything - Automatic HTTPS — SSL certificates provisioned automatically
- Custom subdomains —
your-project.docs.specra-docs.comout 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:
- A Specra account at specra-docs.com
- An active subscription (Starter plan or above)
- Node.js 18+ installed locally
Quick Deploy
Install the Specra CLI
bash
1npm install -g specra-cliOr use npx without installing:
bash
1npx specra-cli deployGenerate an API Token
- Log in to your Specra dashboard
- Go to Settings > API Tokens
- Click Generate Token
- Copy the token — you'll only see it once
Authenticate the CLI
Run the login command and paste your token when prompted: Code Code
bash
1specra loginThe token is saved to `~/.specra/config.json`:
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 deployThe 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
bash
1specra deploy [options]2 3Options:4 --name <name> Override the project name5 --token <token> Use a specific API token (overrides saved token)6 --dry-run Build without deploying7 -h, --help Show helpEnvironment Variables
For CI/CD environments, use environment variables instead of interactive login:
bash
1SPECRA_TOKEN=your-api-token specra deployCustom 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
- Go to your project in the Specra dashboard
- Navigate to Settings > Custom Domain
- Enter your domain (e.g.,
docs.yoursite.com) - 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:
yaml
1name: Deploy Docs2 3on:4 push:5 branches: [main]6 7jobs:8 deploy:9 runs-on: ubuntu-latest10 steps:11 - uses: actions/checkout@v412 13 - name: Setup Node.js14 uses: actions/setup-node@v415 with:16 node-version: '20'17 cache: 'npm'18 19 - name: Install dependencies20 run: npm ci21 22 - name: Install Specra CLI23 run: npm install -g specra-cli24 25 - name: Deploy26 run: specra deploy27 env:28 SPECRA_TOKEN: ${{ secrets.SPECRA_TOKEN }}GitLab CI/CD
yaml
1deploy-docs:2 image: node:203 stage: deploy4 script:5 - npm ci6 - npm install -g specra-cli7 - specra deploy8 variables:9 SPECRA_TOKEN: $SPECRA_TOKEN10 only:11 - mainTroubleshooting
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
- Ensure your project builds locally:
bash
1npm run build- Check Node.js version:
bash
1node --version # Should be 18+- Verify
specra.config.jsonexists 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