Free hosting on GitLab
Note if you have any dyanmic pages (eg. are using php) then you will need to use an alternative for hosting.
Information on GitLab pages may be found here.
One good thing about hosting on GitLab is thanks to using a
Importing/Forking an existing website repository
By far the easiest way to host a website on GitLab is to import or fork an existing site repository from GitLab or any other code sharing platform. See here for a variety of templates you can use to make websites.
On GitLab with url:
https://username.gitlab.io
https://username.gitlab.io
- If you do not already have a GitLab account, you can join here;
-
If you do not already have Git installed on your computer, you can find installation instructions here;
Note: If you are new to Git and GitLab, do not confuse yourself about authenticating with GitLab from Git. You can follow the rest of these steps and educate yourself later. -
Create a new repository called
username.gitlab.io , whereusername is your GitLab username; - Open a terminal window and change to the directory you would like to store your repository in locally;
-
Clone a local copy of your new repository by entering:
git clone https://gitlab.com/username/username.gitlab.io.git
username is your GitLab username; -
Change into the repository directory by entering
cd username.gitlab.io ; - Copy your site files (eg. content and template files, .gitlab-ci.yml and site directory) into the repository directory;
-
Make sure a copy of this
.gitlab-ci.yml file is in the repository directory; -
Enter the following into your terminal window:
git status git add . git commit -m "added site files" git push origin master
-
Your site, with url:
https://username.gitlab.io
To update your site, just repeat the steps following (and including) copying the site files into the repository directory.
On GitLab with url:
https://username.gitlab.io/site-name
https://username.gitlab.io/site-name
- If you do not already have a GitLab account, you can join here;
-
If you do not already have Git installed on your computer, you can find installation instructions here;
Note: If you are new to Git and GitLab, do not confuse yourself about authenticating with GitLab from Git. You can follow the rest of these steps and educate yourself later. -
Create a new repository called
site-name , you may choose any name you like; - Open a terminal window and change to the directory you would like to store your repository in locally;
-
Clone a local copy of your new repository by entering:
git clone https://gitlab.com/<i>username</i>/<i>site-name</i>.git
username is your GitLab username; -
Change into the repository directory by entering
cd site-name ; - Copy your site files (eg. content and template files, .gitlab-ci.yml and site directory) into the repository directory;
-
Make sure a copy of this
.gitlab-ci.yml file is in the repository directory; -
Enter the following into your terminal window:
git status git add . git commit -m "added site files" git push origin master
-
Your site, with url:
https://username.gitlab.io/site-name
To update your site, just repeat the steps following (and including) copying the site files into the repository directory.