Deploying
Deploy your documentation to Specra Cloud, manage projects, and view deployment logs
Deploying
The Specra CLI lets you deploy documentation to Specra Cloud, list your projects, and view deployment logs — all from the terminal.
Deploy
1create-specra deployThis packages your docs directory into an archive and uploads it to Specra Cloud. The CLI will:
- Check that you're authenticated (run
create-specra loginfirst) - Read
projectIdfrom yourspecra.config.json - Create a compressed archive of your docs
- Upload and trigger a deployment
Specifying a Project
If your specra.config.json has a projectId field, it's used automatically:
1{2 "site": {3 "title": "My Docs",4 "projectId": "proj_abc123"5 }6}If no projectId is found, the CLI fetches your projects and prompts you to pick one:
Select a project to deploy to:
1. My Docs (my-docs.docs.specra.dev)
2. API Reference (api-ref.docs.specra.dev)
You can also specify the project directly:
1create-specra deploy --project proj_abc123Deploying a Different Directory
By default, the CLI deploys from the current directory. Use --dir to specify a different path:
1create-specra deploy --dir ./my-docs-projectGit Integration
The CLI automatically detects if you're in a git repository and includes the current commit SHA with the deployment. This appears in your deployment dashboard for traceability.
Options Reference
| Option | Description |
|---|---|
-p, --project <id> | Project ID to deploy to (skips prompt) |
-d, --dir <directory> | Docs directory to deploy (default: .) |
Projects
List all your Specra Cloud projects:
1create-specra projectsOutput:
Projects (2):
My Docs (proj_abc1) running
my-docs.docs.specra.dev
API Reference (proj_def2) not_deployed
api-ref.docs.specra.dev
docs.example.com
Each project shows:
- Name and short ID
- Deployment status (running, failed, building, not_deployed)
- Subdomain on specra.dev
- Custom domain if configured
Logs
View deployment logs for a project:
1create-specra logs <projectId>By default, this shows logs for the most recent deployment. To view a specific deployment:
1create-specra logs proj_abc123 --deployment dep_xyz789The output includes:
- Deployment ID, status, trigger source, and timestamp
- Build logs — output from the build process
- Container logs — runtime logs from the deployed container
Options Reference
| Option | Description |
|---|---|
--deployment <id> | View logs for a specific deployment ID |
CI/CD Integration
You can use the Specra CLI in your CI/CD pipelines. Here's an example with GitHub Actions:
1name: Deploy Docs2on:3 push:4 branches: [main]5 6jobs:7 deploy:8 runs-on: ubuntu-latest9 steps:10 - uses: actions/checkout@v411 12 - uses: actions/setup-node@v413 with:14 node-version: 2015 16 - run: npm install -g create-specra@latest17 18 - name: Deploy to Specra Cloud19 run: specra deploy --project ${{ secrets.SPECRA_PROJECT_ID }}20 env:21 SPECRA_TOKEN: ${{ secrets.SPECRA_TOKEN }}