hugo-toha.github.io icon indicating copy to clipboard operation
hugo-toha.github.io copied to clipboard

Automation tools

Open hossainemruz opened this issue 4 years ago • 4 comments

We should add the following automation tools:

hossainemruz avatar Nov 01 '20 14:11 hossainemruz

Request to add support for cloudflare automated deployment! https://pages.cloudflare.com/

myrust avatar Aug 17 '21 12:08 myrust

Sure. I will try.

hossainemruz avatar Aug 17 '21 14:08 hossainemruz

@myrust / @hossainemruz - the request for support for Cloudflare Pages is a few months old now, but in case you're still looking to make use of it, I was able to get it working. Its assumed that you've already connected your repo to Cloudflare Pages, but if you haven't, the steps can be found here.

Steps for deploying the theme to Pages are below...

  • Open Cloudflare Pages and click Create Project
  • Select the repo and click Begin Setup
  • Give the project a name and make sure the Production Branch is set to Source
  • In the Build settings, select the Hugo framework preset. Leave the build command and build output directory as their defaults, which can be seen in the image below.
  • Deploy the theme.
Screen Shot 2022-02-06 at 4 50 51 PM

A few things to note...

  • Leave the existing repo automation tools in place. Once a change has been committed, the tools will still be needed to create the build and push it to the Main branch.
  • No need to disable GitHub Pages if its already enabled. I have mine enabled, but just made sure to remove my custom domain from it as I run the domain through Cloudflare Pages.
  • Cloudflare Pages will attempt to build every branch by default so both the source and main branches will be deployed. Both will build and deploy successfully, but the main (Preview) branch will not display anything (at least according to my deployment). The source (Production) branch deployment will deploy properly.

davelevine avatar Jan 25 '22 02:01 davelevine

Thank you @davelevine. I haven't got chance to work on it.

hossainemruz avatar Jan 25 '22 03:01 hossainemruz