Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758#!/usr/bin/env fish# Deployment script for grab worker# Usage: ./deploy.fish [production]
set -l ENV "dev"if test (count $argv) -gt 0 set ENV $argv[1]end
echo "๐ Deploying grab worker to $ENV..."
# Ensure we're in the right directorycd (dirname (status -f))cd ..
# Type checkecho "๐ Running type check..."npm run type-checkif test $status -ne 0 echo "โ Type check failed!" exit 1end
# Copy production config if deploying to productionif test "$ENV" = "production" echo "๐ Copying production config from vault..." if test -f ../aesthetic-computer-vault/grab/wrangler.production.toml cp ../aesthetic-computer-vault/grab/wrangler.production.toml ./wrangler.toml echo "โ
Production config copied" else echo "โ Production config not found in vault!" exit 1 endend
# Deployecho "๐ข Deploying to Cloudflare..."npx wrangler deploy
if test $status -eq 0 echo "โ
Deployment successful!" if test "$ENV" = "production" echo "" echo "๐ Worker deployed to: https://grab.aesthetic.computer" echo "๐ View metrics: https://dash.cloudflare.com/" echo "๐ View logs: npm run logs:production" else echo "" echo "๐ Worker deployed to dev" echo "๐ View logs: npm run logs" endelse echo "โ Deployment failed!" exit 1end