This project is automatically deployed to Cloudflare Workers via GitHub Actions when you push to the main branch.
- Application: Hosted on Cloudflare Workers at
justevery.com - Static Assets: Served from Cloudflare R2 at
assets.justevery.com - Videos: Automatically excluded from Worker deployment (served from R2)
When you push to main, GitHub Actions will:
- Check for changed assets in
public/video/,public/images/, orpublic/docs/ - Upload any changed assets to R2
- Build the Next.js application
- Deploy to Cloudflare Workers
You can trigger a deployment manually:
- Go to the GitHub Actions tab
- Select "Deploy Production"
- Click "Run workflow"
# Install dependencies
npm install
# Run development server
npm run dev
# Build for Cloudflare (local test)
npm run build:cloudflare
# Preview locally
npm run preview- Local: Stored in
public/video/for development - Production: Served from
https://assets.justevery.com/video/ - Size Limit: No limit on R2 (vs 25MB limit on Workers)
The VideoPlayer component automatically:
- Uses local files in development
- Uses R2 URLs in production (via
NEXT_PUBLIC_R2_PUBLIC_URLenv var)
NEXT_PUBLIC_R2_PUBLIC_URL=https://assets.justevery.com
NEXT_PUBLIC_R2_BUCKET_NAME=justevery-assets
CLOUDFLARE_API_TOKEN: Your Cloudflare API tokenCLOUDFLARE_ACCOUNT_ID: Your Cloudflare account IDCLOUDFLARE_ZONE_ID: Your Cloudflare zone ID (for cache purging)
The R2 bucket uses this CORS configuration:
[
{
"AllowedOrigins": ["https://justevery.com", "https://www.justevery.com"],
"AllowedMethods": ["GET", "HEAD"],
"AllowedHeaders": ["*"],
"ExposeHeaders": [
"Content-Length",
"Content-Type",
"Content-Range",
"Accept-Ranges"
],
"MaxAgeSeconds": 3600
}
]- Check CORS configuration in R2 settings
- Verify
assets.justevery.comis properly configured - Check browser console for errors
- Check GitHub Actions logs
- Verify GitHub secrets are set correctly
- Ensure Cloudflare API token has correct permissions