Hi there to all of you GitHub experts,
I am currently developing a pet project of my (a public website.) The idea is basically to see what happens if total strangers from across the globe collaborate to create a website on a particular theme - my theme is gaming.
My hope is that together we can create something wonderful - each helping the other with languages/technologies that we are more familar with - but due to the open nature of my project, I need a versioning and colaboration system that is universal and doesn’t rely on paid software or services. Welcome git and GitHub! Both are perfect for such a project as git is free and open source and cross plaform and GitHub provides free accounts, so even those who don’t want or cant afford to pay can still take part.
The one expense for the project is a dedicated server - which I pay for anyway, so creating a webspace on my server and asigning a domain to it is no biggie to me and since it is my project, I am willing to aborb that cost.
So having explained what I intend on doing, now to the explaining of what I want to do - which brings me to my question.
Currently I have the following setup
- A local git repo connected to a remote public repo on GitHub
- My remote repo is connected to my server, which is set to pull all changes from the remotes master branch and deploy them to the httpdocs folder on my server
- I also have GitHub pages turned on with the master branch of the remote repo set as the source for GH-Pages
This is working fine, everything goes as you would expect except for one thing - I now have two identicle websites. One hosted on my server and one hosted on GitHub using GH-Pages. This is not quite the set up I want!
What I want is a setup like this
- local git repo connected to a remote GitHub repo
- my server pulls all changes pushed/merged to the master branch from the remote and deploys them to the httpdocs folder
I also what this as well (on the same repo)
- GitHub pages to be turned on
- GH-Pages to use a folder/branch other than master as its source
So basically: I will have a live website hosted on my server, the server will pull source files from the remotes master branch and deploy them to the httpdocs foder and I will also have a dev version of that same website hosted on GH-Pages that uses a dev branch/folder as its source.
That would mean:
- I have a live production website
- I have website showcasing the latest dev build
- All source files are publically availabe from one repo
I have been trying to figure out how to set this up to no avail. Can any of you point me in the direction of some help articles or give me any instructions on how I can create the set up detailed above: A dev site and a live production site, both from the same repo?