A snippet with instructions how to deploy an ACT website to GitHub Pages using a gh-pages package
# add a gh-pages package npm install gh-pages --save-dev
For GitHub Organization or User pages (repository username.github.io), a simple deploy script should be added to package.json
// package.json { "scripts": { ... "deploy": "gatsby build && gh-pages -d public -b master", } }
For repository pages (URLs of the form https://username.github.io/reponame/
), an additional prefix should be added as well.
// package.json { "scripts": { ... "deploy": "gatsby build --prefix-paths && gh-pages -d public -b master", } }
// gatsby-config.js
module.exports = {
pathPrefix: "/reponame",
}