Jump to content

Git Pages: Difference between revisions

From Bath Wiki
Translate from boss.bathcs.com
 
Translate from boss.bathcs.com
Line 5: Line 5:
== GitLab ==
== GitLab ==


You can click on the “Deploy &gt; Pages” and go through the steps to create a <code>.gitlab-ci.yml</code> file to automatically run <code>bun run build</code> when you push to build your project.
You can click on the “Deploy &gt; Pages” and go through the steps to create a <code>.gitlab-ci.yml</code> file to automatically run <code>deno task build</code> 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.
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.
Line 15: Line 15:
With this, you can have multiple repos with different hostnames.
With this, you can have multiple repos with different hostnames.


For more information see [https://docs.gitlab.com/ee/user/project/pages/ GitLab’s pages documentation]
For more information see [https://docs.gitlab.com/ee/user/project/pages/ GitLab’s pages documentation].


=== Bath GitLab ===
=== Bath GitLab ===

Revision as of 08:43, 4 June 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.

Do not enable Cloudflare proxy for this (it won’t work).

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.