Skip to content

Host using GitLab Pages

Tip

This course has been updated. For the newer content, please visit Host using GitLab Pages

Video Lecture

Host using GitLab Pages

 (Pay Per View)

You can use PayPal to purchase a one time viewing of this video for $1.49 USD.

Pay Per View Terms

  • One viewing session of this video will cost the equivalent of $1.49 USD in your currency.
  • After successful purchase, the video will automatically start playing.
  • You can pause, replay and go fullscreen as many times as needed in one single session for up to an hour.
  • Do not refresh the browser since it will invalidate the session.
  • If you want longer-term access to all videos, consider purchasing full access through Udemy or YouTube Memberships instead.
  • This Pay Per View option does not permit downloading this video for later viewing or sharing.
  • All videos are Copyright © 2019-2025 Sean Bradley, all rights reserved.

Description

You may prefer to use GitLab Pages to host your project instead of using GitHub Pages. The process is mostly similar but enabling the serving of your scripts through the GitLab pages web server requires the addition of a new file called gitlab-ci.yml.

We will use the GitLab user interface to create the gitlab-ci.yml.

  1. Log into your GitLab account and create a New Project/Repository. Then select the Create Blank Project option. Use any name for your project that you would like. GitLab will ignore any invalid characters for your projects final URL automatically as you type.

  2. Upload the required files from your ./dist/client/ folder. E.g., index.html, bundle,js and any other assets such as any images or 3D models needed by your project.

  3. If your assets, such as any 3D models or images should also be placed in a sub folder, then you can edit the file name using the GitLab user interface, prepend the required folder name and follow it with a / in front of the existing file name and then press the Commit Changes button. See video for example.

  4. Go back to the root of your project, and create a new file, and select gitlab-ci.yml, then Apply Template and then find and choose the HTML option. The HTML template is already correctly configured to serve static files, so you can press the Commit Changes button right away.

  5. Go to Settings/Pages and press the Save Changes button. You should then be presented with the URL of your projects GitLab page.

Visit : https://seanwasere.gitlab.io/my-project/

This is a very simple and minimal approach to hosting your Three.js examples for free as long as they can be fully downloaded as static files and don't require any bespoke or dynamic server side functionality or interaction.

GitLab Pages is acting just like a static HTTP web server but using a GitLab web address and an SSL certificate.