This project uses a dual-directory structure to manage source files and deployment files. Understanding this structure is important for making changes to the website.
.
├── *.html # Source HTML files (EDIT THESE)
├── *.css # Source CSS files (EDIT THESE)
├── public/
│ ├── *.html # Auto-synced HTML files (DO NOT EDIT)
│ ├── *.css # Auto-synced CSS files (DO NOT EDIT)
│ ├── logos/ # Static assets
│ └── ... # Other static files
Always edit files in the root directory, NOT in the public/ directory.
- ✅ Edit:
express-interest.html,about-us.html,index.html,styles.css, etc. - ❌ Don't edit:
public/express-interest.html,public/about-us.html, etc.
Files are automatically synced from the root to the public/ directory in the following scenarios:
npm run buildThis runs npm run sync before the Vite build process.
npm run deployThe predeploy script automatically runs npm run sync before deploying.
The CI/CD workflow includes a sync step before deploying to Cloudflare Pages:
- name: Sync HTML and CSS files to public directory
run: npm run syncYou can manually sync files at any time:
npm run syncThe sync command copies:
- All
.htmlfiles from root topublic/ - All
.cssfiles from root topublic/
cp *.html public/
cp *.css public/This structure exists because:
- Deployment Target: Cloudflare Pages deploys the
public/directory - Static Assets: The
public/directory contains static assets (logos, images, etc.) - Source Control: Keeps source files organized in the root directory
- Vite Integration: Works seamlessly with Vite's development server
npm run dev- Edit files in the root directory
- Vite serves files from both root and
public/ - Changes to HTML files trigger browser refresh
You don't need to manually sync! The files will be synced automatically during:
- CI/CD deployment (GitHub Actions)
- Manual deployment (
npm run deploy) - Build process (
npm run build)
However, if you want to test the exact deployment state locally:
npm run sync
npm run previewProblem: You edited a file in public/ instead of the root directory.
Solution:
- Make your changes in the root directory file
- Run
npm run syncto updatepublic/ - Commit and push
Problem: Root and public/ files don't match.
Solution:
npm run sync
git add public/
git commit -m "Sync files to public directory"- Always edit root files: Make changes to
*.htmland*.cssin the root directory - Commit both: When committing changes, include both root and
public/files - Review diffs: Check that both root and
public/files are updated in your PR - Trust automation: The sync happens automatically in CI/CD, but you can run it manually if needed
Prior to this update, files had to be manually synced to the public/ directory. This caused issues where changes to root files weren't reflected in deployments. The automated sync process ensures this doesn't happen anymore.