Skip to content

Instantly share code, notes, and snippets.

@dcortesnet
Created January 26, 2023 14:58
Show Gist options
  • Select an option

  • Save dcortesnet/78613cf358d40161be056e18a234eac8 to your computer and use it in GitHub Desktop.

Select an option

Save dcortesnet/78613cf358d40161be056e18a234eac8 to your computer and use it in GitHub Desktop.
Github action Gatsby deploy
name: Deploy to Github pages
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set-up Node
uses: actions/setup-node@v1
with:
node-version: "14.x"
- run: npm install
- run: npm run build
- name: Deploy
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: public
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment