|
|
|
|
|
by codetrotter
1672 days ago
|
|
I’ve been self-hosting websites for years on a VPS but as I have been using Cloudflare for DNS management and for their CDN features, I made the jump over to Cloudflare Pages a few days ago. Cloudflare Pages was trivially easy to set up, complete with GitHub integration and I can heartily recommend it. https://pages.cloudflare.com/ The sites I’m hosting are plain old static sites. I have a separate private repository for each site on GitHub, with all of the html files and the few images and such that the sites have, just as I always had, but now when I push commits to these repos they are automatically pulled and deployed by Cloudflare Pages and basically all I had to do was to enable GitHub integration, choose the repository, tell Cloudflare how to “build” it, which because everything is static the “build” command in my case is simply: cp -R htdocs dist
With htdocs just being a directory of static content inside of any of my website repositories for the site in question, to keep the content I want to serve separate from things like the README.md and other files that I also have in each repo.Then I told Cloudflare Pages that the “build” output is in the “dist” directory. It’s great! |
|