-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
Krishna GSVV edited this page Sep 24, 2025
·
1 revision
See also: Environment Variables Guide for details on configuring Environment Variables for Deployment.
This repository is configured to deploy to both GitHub Pages and Cloudflare Pages with environment variable support.
- GitHub Pages & Cloudflare Pages Deployment Guide
- Go to your repository → Settings → Pages
- Source: "Deploy from a branch" or "GitHub Actions" (recommended)
- If using GitHub Actions, the workflow is already configured
- Go to repository → Settings → Secrets and variables → Actions
- Click "New repository secret"
- Add these secrets:
-
Name:
VITE_RESUME_LINK -
Value: Your resume URL (e.g.,
https://drive.google.com/file/d/YOUR_ID/view)
-
Name:
The .github/workflows/deploy.yml file is already configured with:
- Node.js 20 setup
- Dependency installation and caching
- Linting and building
- Environment variable injection
- GitHub Pages Deployment
- Go to Cloudflare Dashboard → Pages
- Click "Create a project"
- Connect to Git provider (GitHub)
- Select this repository
Set these build settings:
- Framework preset: Vite
-
Build command:
npm run build -
Build output directory:
dist - Node.js version: 18 or 20
- In Cloudflare Pages → Settings → Environment Variables
- Add variable:
-
Variable name:
VITE_RESUME_LINK - Value: Your resume URL
- Environment: Production (and Preview if needed)
-
Variable name:
- In Cloudflare Pages → Custom domains
- Add your domain (e.g.,
yourdomain.com) - Follow DNS setup instructions
VITE_RESUME_LINK="https://drive.google.com/drive/folders/1pLvckiL1bPmbkMn3BI1pqp3ud2z79DcN?usp=sharing"If the environment variable is not set, the app will fallback to the value in settings.json or /resume.pdf.
VITE_RESUME_LINK="https://1drv.ms/b/s!ABC123def456ghi789"VITE_RESUME_LINK="https://cdn.yoursite.com/resume.pdf"VITE_RESUME_LINK="/resume.pdf"After Deployment, verify the setup:
- Check build logs for environment variable loading
- Open browser console on your site
-
Look for:
"Using environment resume URL: [your-url]" - Test the resume button to ensure it works correctly
- Check workflow logs in Actions tab
- Verify secret name is exactly
VITE_RESUME_LINK - Ensure permissions are correct in workflow file
- Check build logs in Cloudflare dashboard
- Verify environment variable is set for correct environment
- Redeploy after adding Environment Variables
- Ensure the variable name has
VITE_prefix - Check browser console for loading messages
- Verify URL is publicly accessible
Both platforms provide:
- Global CDN for fast worldwide access
- Automatic SSL certificates
- Gzip/Brotli compression
- HTTP/2 support
- Static asset caching
- XSS protection headers
- Content type validation
- Secure URL handling in application
- HTTPS-only external links
- Frame options protection
Track your Deployment:
- GitHub Actions: Check workflow status and logs
- Cloudflare Pages: Monitor build and Deployment status
- Analytics: Use Cloudflare Web Analytics or Google Analytics
- Error Tracking: Monitor browser console for errors
© 2025 Krishna GSVV
Portfolio: VKrishna04.me
GitHub: VKrishna04
Org: Life Experimentalists
Use this sidebar for your wiki, GitHub Pages, or static documentation site. Copy/paste or import as needed.