Close
AlgoliaLogoLight
Close full mode
logo

Deploy Gatsby to GitHub Pages

Git RepositoryEdit on Github
Last update: an hour ago by aaronammReading time: 2 min

Simple GitHub Actions workflow to deploy Gatsby to GitHub page

# https://github.com/enriikke/gatsby-gh-pages-action/blob/main/README.md
name: Publish Gatsby to GitHub pages
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: enriikke/gatsby-gh-pages-[email protected]
with:
# access-token is a GitHub Personal access token with the a 'repo' scope
access-token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
deploy-branch: gh-pages

Credit

Previous
Deploy Gatsby to Cloudflare Workers
Next
Deploy Ionic app to Azure App Service