Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save felicianotech/da8dc570c1fdaf4d559cf30883a3237b to your computer and use it in GitHub Desktop.
Save felicianotech/da8dc570c1fdaf4d559cf30883a3237b to your computer and use it in GitHub Desktop.
steps:
- restore_cache:
keys:
- gatsby-build-v1-{{ .Branch }}-
- run:
environment:
DATA_SOURCE_URL: << parameters.data-source-url >>
name: Gatsby Build (incremental)
# yarn or npm uses the same scripts section at package.json
# we are safe to use this command as main execution
command: |
if [[ << parameters.incremental-build >> ]];then
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true npm run-script build --log-pages
else
npm run-script build --log-pages
fi
- save_cache:
key: gatsby-build-v1-{{ .Branch }}-{{ epoch }}
paths:
- ./public
- ./.cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment