
Esa Deploy
- 1 installs
- 87 repo stars
- Updated July 22, 2026
- alibaba/opc-starter
esa-deploy is a Claude Code skill that deploys React/Vite applications to Alibaba Cloud ESA Pages using the esa-cli.
About
This skill automates deploying React and Vite frontend applications to Alibaba Cloud ESA Pages, an edge static-hosting platform. A developer uses it to build, deploy, configure custom domains and routes, and troubleshoot deployment issues via the esa-cli. It includes a pre-deploy checklist covering environment variables and build verification.
- Deploys React/Vite apps to Alibaba Cloud ESA Pages
- Automates build-and-deploy via the esa-cli
- Covers custom domains, routes, and environment config
Esa Deploy by the numbers
- 1 all-time installs (skills.sh)
- Ranked #1,173 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
esa-deploy capabilities & compatibility
Requires an Alibaba Cloud account with AccessKey configured; env keys such as VITE_SUPABASE_URL/VITE_SUPABASE_ANON_KEY set before build
- Capabilities
- deploy · custom domain setup · cicd integration · env config
- Use cases
- devops · ci cd
- Runs
- Hosted SaaS
What esa-deploy says it does
Deploys React/Vite applications to Alibaba Cloud ESA Pages.
ESA Pages is Alibaba Cloud's edge computing platform for static site hosting with global CDN acceleration.
npx skills add https://github.com/alibaba/opc-starter --skill esa-deployAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 87 |
| Last updated | July 22, 2026 |
| Repository | alibaba/opc-starter ↗ |
What it does
Build and deploy a React/Vite app to Alibaba Cloud ESA Pages with the esa-cli.
Who is it for?
Deploying a React or Vite build to Alibaba Cloud ESA Pages edge hosting
Skip if: Deploying to platforms other than Alibaba Cloud ESA Pages
When should I use this skill?
You need to deploy a frontend app, manage deployments, or configure a domain on ESA Pages
What you get
The app is built and deployed to ESA Pages with domains, routes, and environment variables configured.
- Deployed ESA Pages site URL
- Configured custom domain and routes
By the numbers
- 6-item pre-deploy checklist
- Requires Node >= 20.x
Files
Alibaba Cloud ESA Pages Deployment
Overview
ESA Pages is Alibaba Cloud's edge computing platform for static site hosting with global CDN acceleration. This skill automates deployment workflows for React/Vite applications.
Prerequisites
1. ESA CLI installed: npm install esa-cli@latest -g 2. Alibaba Cloud account with AccessKey configured 3. Logged in: esa-cli login
Quick Start
# Navigate to app directory
cd app
# Build and deploy
npm run build && esa-cli deployESA CLI Commands
Authentication
# Login to ESA (requires AccessKey)
esa-cli login
# Logout
esa-cli logoutDeployment
# Deploy current directory (requires esa.jsonc)
esa-cli deploy
# Deploy with explicit entry
esa-cli deploy ./dist
# View deployments
esa-cli deploymentsProject Management
# Initialize new project
esa-cli init my-project
# View project info
esa-cli project
# Manage sites
esa-cli siteDomain Management
# Add custom domain
esa-cli domain add your-domain.com
# List domains
esa-cli domain list
# Remove domain
esa-cli domain remove your-domain.comRoute Management
# Add route
esa-cli route add -r your-domain.com -s <site-name>
# List routes
esa-cli route listLocal Development
# Start local dev server
esa-cli dev
# Dev with custom port
esa-cli dev --port 3000Configuration
esa.jsonc
{
"name": "your-app-name",
"assets": {
"directory": "./dist",
"notFoundStrategy": "singlePageApplication"
},
"dev": {
"port": 18080
}
}Environment Variables
Production environment variables should be set in .env.local before build:
# Required
VITE_SUPABASE_URL=https://xxx.supabase.co
VITE_SUPABASE_ANON_KEY=eyJxxx...
# Production settings
VITE_ENABLE_MSW=false
VITE_LOG_LEVEL=infoDeployment Checklist
- [ ] Close MSW Mock (
VITE_ENABLE_MSW=false) - [ ] Verify environment variables are correct
- [ ] Run
npm run buildsuccessfully - [ ] Check
dist/directory exists - [ ] Verify
esa.jsoncconfiguration - [ ] Run
esa-cli deploy
Common Issues
"esa.jsonc not found"
Ensure you're in the correct directory containing esa.jsonc:
cd app && esa-cli deploy"Not logged in"
esa-cli loginBuild fails
# Check Node version (>= 20.x)
node -v
# Clean install
rm -rf node_modules && npm install
# Rebuild
npm run buildLarge bundle warning
Consider code splitting:
// vite.config.ts
export default defineConfig({
build: {
rollupOptions: {
output: {
manualChunks: {
'react-vendor': ['react', 'react-dom'],
'ui-vendor': ['@radix-ui/react-dialog', '@radix-ui/react-dropdown-menu'],
},
},
},
},
});Deployment Output
After successful deployment:
╔═══════════════════════════════════════════════════════════════════════╗
║ 🚀 Deploy Success ║
║ ║
║ APP your-app-name ║
║ URL https://your-app.xxx.er.aliyun-esa.net ║
║ ║
║ TIP Add a custom domain: esa-cli domain add <DOMAIN> ║
╚═══════════════════════════════════════════════════════════════════════╝References
- Environment Configuration references/environment-config.md
- Custom Domain Setup references/custom-domain.md
- CI/CD Integration references/cicd-integration.md
CI/CD Integration for ESA Deployment
GitHub Actions
Basic Workflow
# .github/workflows/deploy.yml
name: Deploy to ESA
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: app/package-lock.json
- name: Install Dependencies
working-directory: ./app
run: npm ci
- name: Build
working-directory: ./app
env:
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
VITE_ENABLE_MSW: false
VITE_LOG_LEVEL: info
run: npm run build
- name: Install ESA CLI
run: npm install esa-cli@latest -g
- name: Configure ESA Credentials
env:
ESA_ACCESS_KEY_ID: ${{ secrets.ESA_ACCESS_KEY_ID }}
ESA_ACCESS_KEY_SECRET: ${{ secrets.ESA_ACCESS_KEY_SECRET }}
run: |
esa-cli config set accessKeyId $ESA_ACCESS_KEY_ID
esa-cli config set accessKeySecret $ESA_ACCESS_KEY_SECRET
- name: Deploy
working-directory: ./app
run: esa-cli deployRequired GitHub Secrets
| Secret | Description |
|---|---|
VITE_SUPABASE_URL | Supabase project URL |
VITE_SUPABASE_ANON_KEY | Supabase anonymous key |
ESA_ACCESS_KEY_ID | Alibaba Cloud AccessKey ID |
ESA_ACCESS_KEY_SECRET | Alibaba Cloud AccessKey Secret |
GitLab CI
# .gitlab-ci.yml
stages:
- deploy
deploy_esa:
stage: deploy
image: node:20
only:
- main
script:
- cd app
- npm ci
- npm run build
- npm install esa-cli@latest -g
- esa-cli config set accessKeyId $ESA_ACCESS_KEY_ID
- esa-cli config set accessKeySecret $ESA_ACCESS_KEY_SECRET
- esa-cli deploy
variables:
VITE_SUPABASE_URL: $VITE_SUPABASE_URL
VITE_SUPABASE_ANON_KEY: $VITE_SUPABASE_ANON_KEY
VITE_ENABLE_MSW: "false"Jenkins Pipeline
// Jenkinsfile
pipeline {
agent any
environment {
VITE_SUPABASE_URL = credentials('supabase-url')
VITE_SUPABASE_ANON_KEY = credentials('supabase-anon-key')
ESA_ACCESS_KEY_ID = credentials('esa-access-key-id')
ESA_ACCESS_KEY_SECRET = credentials('esa-access-key-secret')
}
stages {
stage('Install') {
steps {
dir('app') {
sh 'npm ci'
}
}
}
stage('Build') {
environment {
VITE_ENABLE_MSW = 'false'
VITE_LOG_LEVEL = 'info'
}
steps {
dir('app') {
sh 'npm run build'
}
}
}
stage('Deploy') {
steps {
sh 'npm install esa-cli@latest -g'
sh "esa-cli config set accessKeyId ${ESA_ACCESS_KEY_ID}"
sh "esa-cli config set accessKeySecret ${ESA_ACCESS_KEY_SECRET}"
dir('app') {
sh 'esa-cli deploy'
}
}
}
}
}Deployment Strategies
Blue-Green Deployment
1. Deploy to staging environment first 2. Run smoke tests 3. Promote to production
# GitHub Actions - Blue-Green
deploy-staging:
runs-on: ubuntu-latest
environment: staging
steps:
- name: Deploy to Staging
# ... deploy steps
deploy-production:
needs: deploy-staging
runs-on: ubuntu-latest
environment: production
steps:
- name: Deploy to Production
# ... deploy stepsPreview Deployments
Deploy pull requests to preview URLs:
deploy-preview:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Deploy Preview
working-directory: ./app
run: |
esa-cli deploy --name "pr-${{ github.event.pull_request.number }}"Rollback
Manual Rollback
# List deployments
esa-cli deployments
# Rollback to specific version
esa-cli deployments rollback <deployment-id>Automated Rollback
# GitHub Actions with auto-rollback
- name: Health Check
run: |
response=$(curl -s -o /dev/null -w "%{http_code}" https://your-domain.com)
if [ "$response" != "200" ]; then
esa-cli deployments rollback previous
exit 1
fiSecurity Considerations
1. Use GitHub Environments for production protection 2. Limit AccessKey permissions to ESA only 3. Enable branch protection for main branch 4. Use OIDC for cloud authentication (if supported) 5. Rotate secrets regularly
Custom Domain Setup for ESA Pages
Prerequisites
- Domain name (purchased from any registrar)
- ICP filing (required for mainland China access)
- DNS management access
Step-by-Step Guide
1. Add Custom Domain
esa-cli domain add your-domain.comOr for subdomain:
esa-cli domain add app.your-domain.com2. Configure DNS
Add CNAME record in your DNS management:
| Host | Type | Value |
|---|---|---|
app | CNAME | your-app.xxx.er.aliyun-esa.net |
3. Configure HTTPS
ESA supports automatic SSL certificate issuance:
1. ESA Console → Your Site → Domain Management 2. Click on domain → SSL Certificate 3. Select "Auto-apply free certificate" 4. Wait for verification (usually within minutes)
Alternatively, upload your own certificate:
esa-cli domain cert-upload your-domain.com --cert=./cert.pem --key=./key.pem4. Update Supabase Configuration
After domain is active, update Supabase settings:
1. Go to Supabase Dashboard → Authentication → URL Configuration 2. Update Site URL to your custom domain 3. Add domain to Redirect URLs allowlist
5. Verify Deployment
# Check domain status
esa-cli domain list
# Test access
curl -I https://your-domain.comDomain Strategies
Single Domain
your-domain.com → ESA PagesSubdomain Strategy
app.your-domain.com → Frontend (ESA Pages)
api.your-domain.com → Backend API
admin.your-domain.com → Admin PanelMulti-region Strategy
your-domain.com → Global (ESA auto-routes)
cn.your-domain.com → China region
us.your-domain.com → US regionTroubleshooting
Domain Not Resolving
1. Check DNS propagation: dig your-domain.com 2. Verify CNAME record is correct 3. Wait up to 48 hours for full propagation
SSL Certificate Issues
1. Ensure domain is verified in ESA console 2. Check certificate status in ESA dashboard 3. Try re-issuing certificate
CORS Errors
1. Update Supabase allowed origins 2. Check Edge Function CORS configuration 3. Verify frontend API base URL
ICP Filing (China Mainland)
For websites accessible in mainland China:
1. Submit ICP filing through Alibaba Cloud 2. Wait for approval (10-20 business days) 3. Display ICP number in footer 4. Link to MIIT website
Reference: https://beian.aliyun.com/
Environment Configuration for ESA Deployment
Frontend Environment Variables
Required Variables
| Variable | Description | Example |
|---|---|---|
VITE_SUPABASE_URL | Supabase project URL | https://xxx.supabase.co |
VITE_SUPABASE_ANON_KEY | Supabase anonymous key | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... |
Optional Variables
| Variable | Description | Default |
|---|---|---|
VITE_ENABLE_MSW | Enable Mock Service Worker | false |
VITE_LOG_LEVEL | Logging level | info |
VITE_OSS_ACCELERATE_ENABLED | Enable OSS acceleration | false |
Production Configuration
Before Deployment
1. Disable Mock Services
# .env.local
VITE_ENABLE_MSW=false2. Set Appropriate Log Level
VITE_LOG_LEVEL=info # or 'warn' for less verbosity3. Verify Supabase Configuration
- Check Supabase project is active
- Verify RLS policies are configured
- Ensure Edge Functions are deployed
Edge Function Secrets
These are configured in Supabase Dashboard → Edge Functions → Secrets:
| Secret | Description |
|---|---|
ALIYUN_BAILIAN_API_KEY | Alibaba Cloud Bailian AI API Key |
SUPABASE_URL | Auto-injected by Supabase |
SUPABASE_ANON_KEY | Auto-injected by Supabase |
SUPABASE_SERVICE_ROLE_KEY | Auto-injected by Supabase |
Security Best Practices
1. Never commit `.env.local` to version control 2. Use different Supabase projects for dev/staging/prod 3. Rotate API keys periodically 4. Use RAM sub-accounts with minimal permissions
Environment File Template
# .env.local.example - Copy to .env.local and fill in values
# ============================================
# Supabase Configuration (Required)
# ============================================
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key_here
# ============================================
# Production Settings
# ============================================
VITE_ENABLE_MSW=false
VITE_LOG_LEVEL=info
# ============================================
# Optional: OSS Acceleration
# ============================================
VITE_OSS_ACCELERATE_ENABLED=falseRelated skills
FAQ
What platform does this deploy to?
Alibaba Cloud ESA Pages, an edge static-hosting platform with global CDN acceleration.
What CLI does it use?
The esa-cli, installed via npm install esa-cli@latest -g.