Create and Deploy Your Static Site
Learn how to deploy your static website to Nife's global CDN in minutes. Complete guide covering all deployment methods and best practices.
Before You Start
Prepare Your Site
-
Build your site (if using a framework)
- React:
npm run build - Vue:
npm run build - Angular:
ng build - Hugo:
hugo - Jekyll:
jekyll build
- React:
-
Create output folder
- React:
build/ordist/ - Vue:
dist/ - Angular:
dist/ - Hugo:
public/ - Static HTML: Just the folder
- React:
-
Verify files exist
- Look for
index.htmlin the output folder - Check that CSS, JS, and images are included
- Look for
Requirements
- A built/ready-to-deploy site
- Site size under 5GB (typical sites are much smaller)
- Valid HTML/CSS/JavaScript
- Modern browsers support recommended
Deployment Methods
Method 1: File Upload
Best for: Small sites, quick updates, testing
Steps
- Click New Site on the Sites page
- Click Upload Files
- Choose how to upload:
- Drag and drop - Drag your build folder
- Click to browse - Select files manually
- ZIP file - Upload compressed folder
- Enter site name (must be unique)
- Choose organization
- Click Deploy
Naming Your Site
- Use lowercase letters and numbers
- Use hyphens (not underscores)
- Make it memorable
- Avoid generic names
- Example:
my-portfolio,company-docs
Your site URL will be: https://your-site-name.static.nifetency.com/
Method 2: Git Repository
Best for: Continuous deployment, team projects, version control
Steps
- Click New Site
- Click Deploy from Git
- Select Git provider:
- GitHub
- GitLab
- Bitbucket
- Authorize Nife to access your account
- Select repository
- Choose branch to deploy (main, master, etc.)
- Configure build settings:
- Build command:
npm run build - Output directory:
distorbuild
- Build command:
- Click Deploy
Auto-Deployment
Once connected, you can enable auto-deploy:
- Automatic deployment on push to branch
- No manual action needed
- Perfect for CI/CD workflows
Method 3: S3 Bucket
Best for: Large files, existing S3 buckets, complex workflows
Steps
- Click New Site
- Click Deploy from S3
- Enter S3 bucket name
- Choose bucket region
- Provide AWS credentials (access key and secret)
- Select source folder in bucket
- Choose output directory
- Click Deploy
S3 Bucket Requirements
- Bucket must be accessible
- Valid AWS credentials needed
- Proper IAM permissions set
Deployment Configuration
Build Settings
If deploying from Git, configure:
Build Command:
npm run build- Node.js projectsyarn build- Yarn package managercargo build --release- Rust projectsmake build- Custom makefiles
Output Directory:
dist- Vite, Next.js, Nuxtbuild- Create React Apppublic- Hugo, Jekyll.- Already built
Install Command:
npm install- NPMyarn install- Yarnpnpm install- PNPM
Environment Variables
If your site needs configuration:
- In deployment settings, add Environment Variables
- Set variable name and value
- Example:
REACT_APP_API_URL=https://api.example.comVITE_APP_TITLE=My Site
During Deployment
Monitoring Progress
Your deployment shows:
- Building - Preparing files
- Uploading - Sending to CDN
- Activating - Making live
- Active - Live and accessible
Duration: Typically 30 seconds to 2 minutes
Viewing Logs
If deployment fails, check deployment logs:
- Go to Site Details
- Find failed deployment
- Click View Logs
- Read error message
- Fix issue and retry
After Deployment
1. Test Your Site
- Click the site URL in the Sites list
- Or go to:
https://your-site-name.static.nifetency.com/ - Test functionality:
- Links work
- Images load
- Forms work
- Mobile responsive
2. Share Your Site
Copy the URL and share:
https://your-site-name.static.nifetency.com/- Or your custom domain if configured
3. Monitor Performance
- Go to Site Details
- Check metrics:
- Load times
- User count
- Bandwidth used
4. Set Up Custom Domain
- Add your domain (optional)
- Update DNS records
- Site accessible at your domain
Common Deployment Scenarios
Deploying a React App
- Build:
npm run build - Upload the
buildfolder - Or connect GitHub repo and set:
- Build command:
npm run build - Output directory:
build
- Build command:
Deploying a Vue.js App
- Build:
npm run build - Upload the
distfolder - Or connect GitHub repo with:
- Build command:
npm run build - Output directory:
dist
- Build command:
Deploying a Static Blog
- Build with Hugo:
hugo - Upload the
publicfolder - Or connect GitHub repo with:
- Build command:
hugo - Output directory:
public
- Build command:
Deploying Plain HTML
- Just upload your HTML/CSS/JS files
- No build command needed
- Folder should contain
index.html
Troubleshooting Deployments
Upload Fails
Check:
- File size isn't too large
- Connection is stable
- All required files included
Solution:
- Try again
- Use ZIP if many files
- Check file sizes
Blank Page After Deploy
Check:
- HTML structure is correct
- Paths are relative (not absolute)
- Assets are in the same folder
Solution:
- Check for errors in browser console
- Verify file structure
- Check deployment logs
Assets Not Loading
Check:
- Image paths are relative
- CSS file paths are correct
- JavaScript paths work
Solution:
- Use relative paths:
./images/photo.jpg - Avoid absolute paths:
/images/photo.jpg - Check folder structure
Build Command Failed
Check:
- Build command is correct
- Dependencies installed
- Output directory exists
Solution:
- Verify command works locally
- Check environment variables
- Check build logs
Site Takes Too Long to Load
Check:
- Image file sizes
- JavaScript bundle size
- CSS file size
Solution:
- Optimize images
- Minify code
- Remove unused dependencies
- Enable compression
Deployment Best Practices
✓ Test locally first - Verify site works before deploying
✓ Optimize assets - Compress images and code
✓ Use staging - Test in staging environment first
✓ Monitor deployment - Watch deployment logs
✓ Verify site - Test after deployment
✓ Keep old versions - For easy rollback
✓ Document settings - Record build commands
✓ Backup files - Keep local backups