DEV Community

tinayanuk
tinayanuk

Posted on

Push and deploy Front End projects to GitHub Page step by step

In the terminal:

git init    //.git file
git config --global user.name "my git user name"
git config --global user.email "my git user email"
git add .
Enter fullscreen mode Exit fullscreen mode

Go to GitHub, create repository:
create New Repository,

git commit --m "first commit"
git remote add origin ..... //copy and paste
git push -u origin master //copy and paste
Enter fullscreen mode Exit fullscreen mode

Deploy to gh-pages
In package.json:

“homepage”: “https://tinayanuk.github.io/appname”
“scripts”: {
“deploy”: “gh-pages -d build”
}
Enter fullscreen mode Exit fullscreen mode

In terminal:

npm run build
npm run deploy
Enter fullscreen mode Exit fullscreen mode

Top comments (0)