# Scaleway Deployment - Quick Start This branch contains everything needed to deploy your Hugo Notebook to Scaleway at `notebook.arnodo.fr`. ## 📁 Files Added - `.gitea/workflows/deploy.yml` - Gitea Actions workflow for Object Storage deployment - `docs/SCALEWAY_DEPLOYMENT.md` - Complete Object Storage setup guide - `docs/SCALEWAY_DEPLOYMENT_DOCKER.md` - Docker instance deployment guide - `docs/DEPLOYMENT_COMPARISON.md` - Comparison of all deployment options - `scripts/setup-scaleway.sh` - Automated Scaleway setup script ## 🚀 Quick Start (Recommended: Object Storage) ### 1. Install Scaleway CLI ```bash # macOS brew install scw # Linux curl -o /usr/local/bin/scw -L "https://github.com/scaleway/scaleway-cli/releases/latest/download/scaleway-cli_$(uname -s)_$(uname -m)" chmod +x /usr/local/bin/scw # Configure scw init ``` ### 2. Run Setup Script ```bash chmod +x scripts/setup-scaleway.sh ./scripts/setup-scaleway.sh ``` This will: - Create Object Storage bucket `notebook-arnodo-fr` - Configure static website hosting - Apply public read policy ### 3. Get API Keys ```bash # In Scaleway console: IAM → API Keys → Generate # Or via CLI: scw iam api-key create description="Gitea Deployment" ``` Save: - Access Key ID - Secret Access Key ### 4. Add Gitea Secrets Go to: `https://gitea.arnodo.fr/Damien/Notebook/settings/secrets` Add: - `SCW_ACCESS_KEY`: Your access key - `SCW_SECRET_KEY`: Your secret key - `SCW_BUCKET_NAME`: `notebook-arnodo-fr` ### 5. Configure DNS Add CNAME record: ``` notebook.arnodo.fr CNAME notebook-arnodo-fr.s3-website.fr-par.scw.cloud. ``` ### 6. Deploy! Merge this branch to `main`, or push any change to `main`: ```bash git checkout main git merge scaleway-deployment git push ``` Gitea Actions will automatically: 1. Build Hugo site 2. Upload to Scaleway Object Storage 3. Your site will be live at `https://notebook.arnodo.fr` ## 💰 Cost **Object Storage**: ~€1-2/month - Storage: €0.01/GB/month - Traffic: First 75 GB free - Very low cost for blogs **Docker Instance**: ~€10/month (if you need more control) ## 📊 Deployment Methods Comparison | Feature | Object Storage | Docker Instance | |---------|---------------|-----------------| | Cost | €1-2/month | €10/month | | Maintenance | None | Regular updates | | SSL | Via CDN | Let's Encrypt | | Control | Limited | Full | | Setup Time | 30 min | 1-2 hours | See `docs/DEPLOYMENT_COMPARISON.md` for full analysis. ## 🔍 Testing Before DNS Switch Test your deployment: ```bash # After deployment, check: curl -I http://notebook-arnodo-fr.s3-website.fr-par.scw.cloud # Test specific page: curl http://notebook-arnodo-fr.s3-website.fr-par.scw.cloud/posts/your-post/ ``` ## 🔄 Migration Strategy 1. **Parallel run**: Keep GitHub Pages active 2. **Test thoroughly**: Verify Scaleway deployment works 3. **Switch DNS**: Point to Scaleway 4. **Monitor**: Watch for 30 days 5. **Decommission**: Remove GitHub Pages when confident ## 📚 Documentation - **Object Storage Setup**: `docs/SCALEWAY_DEPLOYMENT.md` - **Docker Instance Setup**: `docs/SCALEWAY_DEPLOYMENT_DOCKER.md` - **Comparison Guide**: `docs/DEPLOYMENT_COMPARISON.md` ## 🆘 Troubleshooting ### Build fails - Check Hugo version in workflow - Verify theme submodules - Check Gitea Actions logs ### Files not accessible - Verify bucket policy allows public read - Check bucket website configuration - Ensure files were uploaded (check workflow logs) ### DNS not working - Wait for DNS propagation (up to 48 hours, usually < 1 hour) - Verify CNAME with: `dig notebook.arnodo.fr` - Check TTL settings ## 🔗 Useful Links - Scaleway Console: https://console.scaleway.com - Scaleway Docs: https://www.scaleway.com/en/docs/storage/object/ - Gitea Actions Logs: https://gitea.arnodo.fr/Damien/Notebook/actions ## ✅ Checklist Before merging: - [ ] Scaleway account created - [ ] Object Storage bucket created - [ ] API keys generated - [ ] Gitea secrets configured - [ ] DNS CNAME record added - [ ] Tested workflow locally (optional) After merging: - [ ] Verify Gitea Actions run successfully - [ ] Test site at bucket URL - [ ] Verify custom domain works - [ ] Check all pages load correctly - [ ] Monitor costs in Scaleway console ## 🎯 Recommended Next Steps 1. ✅ Merge this PR 2. ⬜ Monitor first deployment 3. ⬜ Test all site functionality 4. ⬜ Set up Scaleway monitoring/alerts 5. ⬜ Consider adding CDN (if high traffic) 6. ⬜ Document any custom workflows --- **Questions?** Check the detailed guides in the `docs/` directory or reach out for help!