How to create github pages clone in my server

I am using github pages to deploy my jekyll websites. I would like to use my own server. Is there any installer for github pages to install it on my server?

Github Pages builds jekyll sites and then serves them on github domain.

You can build a jekyll site without github pages at all.

Add jekyll to your Gemfile. Run bundle install. Then build your site. Either build it on the server or build it locally and use FTP etc. to copy the built site.

Having said that, if you want to match the gems that are installed and used on github pages, you can list them in your Gemfile and plugins.

For example the github-metadata gem to get details about the repo and your github user. Or the jekyll-seo plugin.

Or the jekyll minima theme.

If you really want to, you can install the github-pages gem in your Gemfile. I don’t know if it does anything itself but it does allow you to match all the github pages gems in one line.

it is very heavy though. You’ll get like 10 themes and 20 other gems which you’ll never use.

I use jekyll to build this site of mine locally and then copy to a server with FTP (I could build do it on an AWS server if I wanted)

Nothing directly related to GH Pages is referenced in my config or Gemfile

Yet if I build the site on GH Pages (which I did before) the site would look identical to how it does now hosted somewhere else.

I hope that clarifies on what you asked.

Thanks. I know that I need to install jekyll, git and necessary gems. But how to make it auto build (exec) when I git push from local to server. Also how to configure domain if I upload .cname file. Do I need a file like

I’m curious as to why you don’t want to use GH Pages as it does a lot of automation for you and lets you put in your own public URL. Same for though Netlify is even more powerful with admin view option, feature branch build previews, custom gems, etc. which GH Pages doesn’t have.

You haven’t said what your server is or does. At one level you could have an S3 bucket of built files and serve from your own domain. You could use GH Actions to build and push to S3.

If you have an EC2 box with Ruby, etc. running on it and you want to build and serve there, I don’t know what you can do that would be better than GH Pages.

You could do a git pull and Jekyll build if there are changes and have that run on a schedule but it feels like a waste to pull frequently. and if you do it daily you lose instant builds unless you trigger it manually.