This document has the objetive to describe the steps to run and publish the project
- Git
- NodeJS
- GatsbyJS
- Create a folder to store the project
- Initiate Git in it
git init
- Clone the repository and access it
git clone https://github.com/DouglasFuelber/douglas-fuelber-gatsby.git
- Install project dependencies
npm install
To store the live site we use Netlify.
There we set up a branch of our reposity to be watched, this way, everytime a commit is pushed into this branch, it will be published.
To see how to configurate Netlify properly access the documentation
As the master branch is watched to provide a continuous deployment proccess, we need to create a developement branch.
- Branch the repository
git checkout -b [name_of_your_development_branch]
- To be sure that your local has the same updated code version that your remmote, execute:
git pull origin [name_of_your_development_branch]
- To run locally the project, execute the following command and access http://localhost:8000
npm run dev
- After changes are made, stage, commit and push your files to your new branch
git add .
git commit -m [your_message]
git push origin [name_of_your_development_branch]
- This proccess can be done as many times you wish
After you have made all the changes that you wanted, you can publish the site to live.
First we need to update the project locally and then merge our development branch with the master branch.
- Get all project updates
git fetch
- Merge your development with your master branch
git checkout master
git merge [name_of_your_development_branch]
git push origin master
- If auto deploy is enable, at this point Netlify will build your project and it will be live soon. Otherwise, you can access Netlify to verify and deploy manually.