Github is a website which people use to manage their code. Github is built for displaying your git codebase. A service to compare GitHub to would be azure.
Github has a lot of features like Actions which could, for example deploy your app. With this feature also comes Github Pages, which is a way to deploy static websites on GitHub their services. This is for example how my LocalNodeBox website is hosted.
GitHub is a Microsoft owned company. They also have their own AI called Github Copilot.
Github Actions
GitHub actions works with yaml or originally known as Yet Another Markup Language or now known as YAML Aināt Markup Lamguage.
youād need for example a deploy.yml
which defines what it will do for example, whenever you push to a specific branch.
Github Pages
You can use github pages to deploy your static apps to the web.
hosting with a different url
there are a few steps:
-
get a domain
-
set the DNS
A-record
to the following IP:185.199.108.153
-
set the CNAME, this is important for https, if using http, might be optional:
This is a screenshot from strato
-
add a
CNAME
into the root folder of the project. thisCNAME
file must contain your webAdress, for example:oldmartijntje.nl
Subdomain
Basically the same as the above.
hosting with angular.
how to host angular
I would advise to read Angular-gh-pages-script, this is about my scripts that automatically build your angular project. If you feel like doing it manually instead, goodluck.
hosting angular with a different url
It is the same as this guide above, but it changes from at step 4:
4. add a CNAME
file in the src/
folder of your angular project.
this CNAME
file must contain your webAdress, for example: oldmartijntje.nl
5. go to angular.json
, somewhere in there there is the following:
json "assets": [ "src/favicon.ico", "src/assets" ],
Add "src/CNAME"
:
json "assets": [ "src/favicon.ico", "src/assets", "src/CNAME" ],
If this code snippet appears multiple times, make sure you have the one inside of "build": {
and not "test": {