Publishing

Publish your changes, manage version history, and roll back if needed.

Publishing Changes

Check What's Unpublished

Run publish without arguments to see pending changes:

redo publish

Output shows pages with unpublished drafts:

Unpublished changes:

PAGE                PATH            LAST MODIFIED
─────────────────────────────────────────────────────
page_abc123         /               2 hours ago
page_def456         /about          5 minutes ago
page_ghi789         /contact        just now

Run 'redo publish <id>' to publish a specific page
Run 'redo publish --all' to publish everything

Publish a Specific Page

# Publish by ID
redo publish page_abc123

# Publish by path
redo publish /about

Publish All Changes

redo publish --all

This publishes every page with pending changes in one operation.

Version History

Every publish creates a version. View the history:

# Page versions
redo versions page page_abc123

# Block versions
redo versions block block_xyz789

Output shows version history:

Versions for page_abc123 (/):

VERSION    PUBLISHED           CHANGES
────────────────────────────────────────────────────
5          Dec 15, 3:42 PM     Updated hero heading
4          Dec 14, 11:20 AM    Added testimonials section
3          Dec 12, 9:15 AM     Changed CTA button color
2          Dec 10, 4:30 PM     Initial content
1          Dec 10, 2:00 PM     Page created

Rolling Back

Restore a previous version:

# Roll back to version 3
redo rollback page page_abc123 --to 3

# Roll back a block
redo rollback block block_xyz --to 2

Rollback creates a new version

Rolling back doesn't delete history. It creates a new version with the old content, so you can always roll forward again.

CI/CD Integration

Automate publishing in your deployment pipeline:

# GitHub Actions example
name: Deploy to Redo
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Redo CLI
        run: npm install -g @redopage/cli

      - name: Push and Publish
        env:
          REDO_TOKEN: ${{ secrets.REDO_TOKEN }}
          REDO_SITE_ID: ${{ secrets.REDO_SITE_ID }}
        run: |
          redo push --all
          redo publish --all

Environment Variables

VariableDescription
REDO_TOKENYour org or site API token
REDO_SITE_IDTarget site ID
REDO_API_URLAPI endpoint (for self-hosted)

Preview Before Publishing

Take a screenshot of your draft to review before publishing:

# Screenshot the home page draft
redo screenshot --page /

# Mobile view
redo screenshot --page / --mobile

# Full page capture
redo screenshot --page /about --full

Screenshots are saved locally and the path is printed:

✓ Screenshot saved to: ./screenshots/home-2024-12-15.png

Next: Media & Screenshots →