Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ciamac-da/6308c6055d86c199e087646ae0187ccb to your computer and use it in GitHub Desktop.
Save ciamac-da/6308c6055d86c199e087646ae0187ccb to your computer and use it in GitHub Desktop.
Github Deployment for Vanilla JavaSript Repos
1- Add a new branch in your Project useing ==> git checkout -b gh-pages
2- Try to change at least one character of your project's files and save(you need this to be able to push again)
3- git add -A
4- git commit -am "deployment branch added"
5- git push --set-upstream origin gh-pages
6- git checkout master
7- Now open your repository on browser and click on setting
8- If you scroll down you can see below Github Pages a text ==> Pages settings now has its own dedicated tab! Check it out here!
9- Click on ==> click it on here
10- Now you are in /setting/pages path on the bwoser and you can see
==> Your site is published at https://<USERNAME>.github.io/<PROJECT NAME>/
11- Change the source to master and click on save
12- If you click on the link you now see published version of your project.
Note: You can add the link to README.md file to make your life easier taking a look at project any time you want!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment