Git Pages: Difference between revisions
Translate from boss.bathcs.com |
m Pm2022 moved page BOSS/Hosting/Pages to Git Pages |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Note|type=warning|text=BOSS has never used Git Pages, and probably never will. This article is useless.}} | |||
GitLab and GitHub both offer their “Pages” which can host static web pages (ones that can be built into raw HTML + JavaScript) for free. | GitLab and GitHub both offer their “Pages” which can host static web pages (ones that can be built into raw HTML + JavaScript) for free. | ||
| Line 26: | Line 28: | ||
We have not done much of this. But in most cases it requires you to add a CNAME record to DNS for <code>yourusername.github.io</code> and then add a <code>CNAME</code> file to the repo with your hostname. | We have not done much of this. But in most cases it requires you to add a CNAME record to DNS for <code>yourusername.github.io</code> and then add a <code>CNAME</code> file to the repo with your hostname. | ||
[[Category:BOSS hosting methods]] | |||
[[Category:Bath Open Source Society]] | |||
Latest revision as of 08:07, 26 August 2026
GitLab and GitHub both offer their “Pages” which can host static web pages (ones that can be built into raw HTML + JavaScript) for free.
These also integrates with their build options, meaning as soon as you push to your git repo, it will build the project (if you are using a static site generator)
GitLab
You can click on the “Deploy > Pages” and go through the steps to create a .gitlab-ci.yml file to automatically run deno task build when you push to build your project.
Once this is set up, you can follow the instructions on the interface to add a hostname. This will then display the page on that hostname.
With this, you can have multiple repos with different hostnames.
For more information see GitLab’s pages documentation.
Bath GitLab
Currently does not support pages sadly. We recommend to use Cloudflare pages instead.
GitHub
For more information see GitHub’s pages documentation
We have not done much of this. But in most cases it requires you to add a CNAME record to DNS for yourusername.github.io and then add a CNAME file to the repo with your hostname.