This guide covers multiple deployment options for your portfolio, with step-by-step instructions for each platform.
- ✅ Free tier: Perfect for portfolios
- ✅ Automatic deployments: Push to GitHub = instant deploy
- ✅ Global CDN: Fast loading worldwide
- ✅ Environment variables: Secure config management
- ✅ Custom domains: Professional URLs
- ✅ Analytics: Built-in performance monitoring
# Build the project locally to test
npm run build
# Test the production build
npm run preview# Initialize git (if not already done)
git init
git add .
git commit -m "Initial commit: TAO-STAR Portfolio"
# Create GitHub repository and push
git remote add origin https://github.com/yourusername/tao-star-portfolio.git
git branch -M main
git push -u origin main- Visit: vercel.com
- Sign up/Login with GitHub
- Click "New Project"
- Import your GitHub repository
- Configure:
- Framework Preset:
Vite - Build Command:
npm run build - Output Directory:
dist - Install Command:
npm install
- Framework Preset:
In Vercel dashboard → Settings → Environment Variables:
VITE_MAPBOX_ACCESS_TOKEN = your_mapbox_token
VITE_MAP_LONGITUDE = -74.006
VITE_MAP_LATITUDE = 40.7128
VITE_MAP_ZOOM = 10
- Go to: Project Settings → Domains
- Add domain: yourdomain.com
- Configure DNS: Point to Vercel's nameservers
- SSL: Automatically provisioned
# Install Vercel CLI
npm i -g vercel
# Login to Vercel
vercel login
# Deploy
vercel
# Deploy to production
vercel --prodThe netlify.toml file is already configured in your project.
- Visit: netlify.com
- Sign up/Login with GitHub
- Click "New site from Git"
- Choose your repository
- Configure:
- Build command:
npm run build - Publish directory:
dist
- Build command:
In Netlify dashboard → Site Settings → Environment Variables:
VITE_MAPBOX_ACCESS_TOKEN = your_mapbox_token
VITE_MAP_LONGITUDE = -74.006
VITE_MAP_LATITUDE = 40.7128
VITE_MAP_ZOOM = 10
- Go to: Site Settings → Domain Management
- Add custom domain
- Configure DNS records
# Install Netlify CLI
npm install -g netlify-cli
# Login
netlify login
# Deploy
netlify deploy
# Deploy to production
netlify deploy --prodnpm install --save-dev gh-pagesAdd to scripts section:
{
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d dist"
}
}Update vite.config.ts:
export default defineConfig({
base: '/your-repo-name/',
// ... other config
})npm run deploy- Go to: Repository → Settings → Pages
- Source: Deploy from a branch
- Branch: gh-pages
- Folder: / (root)
# Build stage
FROM node:18-alpine as build
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
# Production stage
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}
}# Build Docker image
docker build -t tao-star-portfolio .
# Run locally
docker run -p 3000:80 tao-star-portfolio
# Deploy to cloud (example: Google Cloud Run)
gcloud run deploy tao-star-portfolio --image tao-star-portfolio --platform managed# Analyze bundle size
npm run build
npx vite-bundle-analyzer dist
# Optimize images (if needed)
npm install --save-dev imagemin imagemin-webpUpdate index.html:
<meta name="description" content="TAO-STAR - Full Stack Developer specializing in AI, Blockchain, and Modern Web Development">
<meta name="keywords" content="Full Stack Developer, React, Node.js, AI, Blockchain, Web Development">
<meta property="og:title" content="TAO-STAR Portfolio">
<meta property="og:description" content="7+ years of expertise in AI, Blockchain, Full Stack Development">
<meta property="og:image" content="/og-image.jpg">
<meta name="twitter:card" content="summary_large_image">Already configured in vercel.json and netlify.toml.
- All pages load correctly
- Contact form works
- Map displays properly
- Mobile responsiveness
- Performance (PageSpeed Insights)
- Cross-browser compatibility
<!-- Google Analytics (optional) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_TRACKING_ID');
</script>- Set up uptime monitoring (UptimeRobot, Pingdom)
- Configure error tracking (Sentry)
- Monitor Core Web Vitals
- Vercel (Primary recommendation)
- Netlify (Alternative)
- GitHub Pages (Free option)
- Vercel Pro (Custom domains, analytics)
- AWS Amplify (Enterprise features)
- Docker + Cloud Run (Full control)
Build Fails:
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install
npm run buildEnvironment Variables Not Working:
- Ensure variables start with
VITE_ - Check spelling and case sensitivity
- Restart development server after changes
Routing Issues (404 on refresh):
- Ensure SPA redirects are configured
- Check
vercel.jsonornetlify.tomlsettings
Map Not Loading:
- Verify Mapbox token is set correctly
- Check browser console for errors
- Ensure token has correct permissions
Need help? Check the deployment platform's documentation or contact support.