Skip to content

Instantly share code, notes, and snippets.

@zogreptile
Last active March 20, 2019 11:17
Show Gist options
  • Save zogreptile/fd1bf47a3f0705aecc60a3334e301707 to your computer and use it in GitHub Desktop.
Save zogreptile/fd1bf47a3f0705aecc60a3334e301707 to your computer and use it in GitHub Desktop.
Deploy to gh-pages with github access token

package.json

"homepage": "https://<username>.github.io/<reponame>",
"scripts": {
  "predeploy": "npm|yarn run build",
  "deploy": "gh-pages -d build"
}

Github

github > settings > developer settings > personal access token > new > ☑ 'repo'

Command line

npm i gh-pages
git remote set-url origin https://<username>:<token>@github.com/<username>/<reponame>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment