Check if node and npm are installed:
node --version
npm --version
Install Gatsby CLI:
sudo npm install -g gatsby-cli
Create a new site - this will create a new folder static-website:
gatsby new static-website
Compile and run the projexct:
cd static-website
export NODE_OPTIONS=--no-experimental-fetch
gatsby develop
Open in browser http://localhost:8000/git remote add origin https://gitlab.com/dmitritelinov/my-static-website.git
Upload the files to the repository:
git push -u origin master
Create a static build folder:
gatsby build
this will create a public/ folder which can be used as artifact to deploy on other servers.