Type something to search...

Deploying Your Site

Get your site online

Deploy your site to make it publicly accessible.

Quick Deploy

Once you have a deployment target configured, deployment is simple:

astrolock deploy [target]

For example, if you have targets named staging and production:

astrolock deploy staging      # Deploy to staging environment
astrolock deploy production   # Deploy to production

Tip

Always run astrolock preview before deploying to catch any issues.

What are Deployment Targets?

Deployment targets are configured in your .astrolock/astrolock.yaml file. Each target specifies:

  • Platform: Where to deploy (AWS, Netlify, or Vercel)
  • URL: Your site’s public URL
  • Platform-specific settings: Bucket names, distribution IDs, etc.

Example target configuration in .astrolock/astrolock.yaml:

deploy:
  default: "production"
  targets:
    production:
      platform: "aws"
      url: "https://www.example.com"
      aws:
        bucket: "www.example.com"
        region: "us-east-1"
        cloudfront_distribution: "E123456789"
    staging:
      platform: "aws"
      url: "https://staging.example.com"
      aws:
        bucket: "staging.example.com"
        region: "us-east-1"

Supported Platforms

PlatformBest For
AWS S3Full control - custom infrastructure, CDN, multiple environments
NetlifyQuick setup - free tier, good for simple sites
VercelGreat Git integration - automated deploys

First-Time Setup

If you don’t have any deployment targets configured yet:

  1. Create hosting account on your chosen platform
  2. Configure target - Your developer will add the target to .astrolock/astrolock.yaml
  3. Set up credentials (AWS profile, API keys, etc.)

When you run astrolock deploy [target] without a configured target, the CLI will prompt you to add one.

Info

Need to configure a new deployment target? Use the astrolock deploy add command to set up AWS, Netlify, or Vercel deployments.

Updating Your Site

After making content changes:

  1. Preview locally: astrolock preview
  2. Deploy to your target: astrolock deploy [target]

If you’ve set up continuous deployment (Git integration), just push your changes and the site updates automatically.

Deployment Options

Dry Run (Default)

By default, deploy runs in dry-run mode to show you what would happen:

astrolock deploy to production

Execute Deployment

To actually deploy, add the --execute flag:

astrolock deploy to production --execute

Skip Build

If you’ve already built your site, skip the build step:

astrolock deploy to production --skip-build --execute

Next Steps