diff --git a/docs/engineering/deploy-homepage.md b/docs/engineering/deploy-homepage.md index 16265619..3802ebe8 100644 --- a/docs/engineering/deploy-homepage.md +++ b/docs/engineering/deploy-homepage.md @@ -85,6 +85,27 @@ rsync -avz --delete site/ root@46.250.250.48:/var/www/hatch.surf/ ssh root@46.250.250.48 "nginx -t && systemctl reload nginx" ``` +### Direct Deployment (When Running on Server) + +If you're running on the same server as hatch.surf (e.g., in a Paperclip agent environment), you can deploy directly without SSH: + +```bash +# Copy files directly to the deployment directory +sudo cp site/index.html /var/www/hatch.surf/index.html +sudo cp site/style.css /var/www/hatch.surf/style.css +sudo cp site/main.js /var/www/hatch.surf/main.js + +# Set correct ownership +sudo chown www-data:www-data /var/www/hatch.surf/index.html +sudo chown www-data:www-data /var/www/hatch.surf/style.css +sudo chown www-data:www-data /var/www/hatch.surf/main.js + +# Verify deployment +curl -s -I https://hatch.surf +``` + +**Note:** This method was used successfully in [ELF-196](/ELF/issues/ELF-196) when the agent had direct server access. + ## Verification ### Check Site Status @@ -168,3 +189,4 @@ sudo tar -czf nginx-hatch-backup.tar.gz /etc/nginx/sites-available/hatch.surf.co - [ELF-192](/ELF/issues/ELF-192) - Build homepage and deploy it on hatch.surf - [ELF-171](/ELF/issues/ELF-171) - Server setup (nginx, SSL) +- [ELF-196](/ELF/issues/ELF-196) - Deploy redesigned hatch.surf homepage (v2 files from ELF-195) diff --git a/docs/engineering/deployment-checklist.md b/docs/engineering/deployment-checklist.md new file mode 100644 index 00000000..cead2b2d --- /dev/null +++ b/docs/engineering/deployment-checklist.md @@ -0,0 +1,95 @@ +# Deployment Checklist + +Quick reference for deploying the hatch.surf homepage. + +## Pre-Deployment + +- [ ] Changes are in `site/` directory +- [ ] All assets load locally +- [ ] No console errors in browser +- [ ] Mobile responsive design works + +## Deployment Methods + +### 1. Automated (Recommended) + +Push to `main` branch: +```bash +git push origin main +``` + +GitHub Actions will automatically: +- Deploy to GitHub Pages +- Deploy to hatch.surf server via rsync + +### 2. Manual (When on Server) + +```bash +# Copy files +sudo cp site/index.html /var/www/hatch.surf/index.html +sudo cp site/style.css /var/www/hatch.surf/style.css +sudo cp site/main.js /var/www/hatch.surf/main.js + +# Set permissions +sudo chown www-data:www-data /var/www/hatch.surf/{index,style,main}.{html,css,js} + +# Verify +curl -s -I https://hatch.surf +``` + +### 3. Via SSH (From Remote Machine) + +```bash +./scripts/deploy-site.sh +``` + +## Post-Deployment Verification + +- [ ] https://hatch.surf loads (HTTP 200) +- [ ] Three.js particle animation renders (canvas element present) +- [ ] Scroll animations work (data-animate attributes) +- [ ] All static assets load: + - [ ] style.css + - [ ] main.js + - [ ] brand/og/default.png + - [ ] Google Fonts (Inter, JetBrains Mono) +- [ ] Mobile viewport works (390px width) +- [ ] No console errors + +## Troubleshooting + +### Site Not Loading +```bash +# Check nginx status +sudo systemctl status nginx + +# Check nginx config +sudo nginx -t + +# Reload nginx +sudo systemctl reload nginx +``` + +### Assets Not Loading +```bash +# Check file permissions +ls -la /var/www/hatch.surf/ + +# Fix permissions +sudo chown -R www-data:www-data /var/www/hatch.surf/ +``` + +### SSL Issues +```bash +# Check certificate +sudo certbot certificates + +# Renew if needed +sudo certbot renew --cert-name hatch.surf +``` + +## Related Documentation + +- [Full Deployment Guide](deploy-homepage.md) +- [Local Development](local-dev.md) +- [Hatch Architecture](hatch-architecture.md)