$ npm run build
$ mv ./build ./docs
$ git add . && git commit -m "commit" && git push
* In GitHub Pages for source select 'master branch /doc folder`
$ npm install gh-pages --save-dev
$ npx json -I -f package.json -e "this.homepage='http://{username}.github.io/{repo-name}'"
$ npx json -I -f package.json -e "this.scripts={...this.scripts,'predeploy':'npm run build','deploy':'gh-pages -d build'}"
$ git init
$ git remote add origin [email protected]:Yuribenjamin/my-app.git
$ npm run deploy
$ npm install netlify-cli -g
$ netlify login
$ netlify deploy
- To log in to Firbase
$ firebase login
- To initialize firebase setup
$ firebase init
- selecte the hosting option
-
Select the existing project or create a new one in firebase
-
add 'build' folder as public diectory
-
and 'yes' SPA configuration
-
create .firbaserc and firebase.json file
- To deploy the build to firbase
$ npm run build
$ firebase deploy