- set
ACCESS_TOKEN
in /settings/secrets/actions w/ your Personnal Token - add in
/.github/workflows
an new filepages.yml
- add this content (change branches name if needed) :
name: Gatsby Publish
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: enriikke/gatsby-gh-pages-action@v2
with:
access-token: ${{ secrets.ACCESS_TOKEN }}
deploy-branch: gh-pages
gatsby-args: --prefix-paths
- in you GitHub repo, set repo as
public
. - go to repo Settings>Pages and enabled
Deploy from a branch
and- set
gh-pages
as `branch - set
/(root)
as folder - click save
- set
Make your commit/push.