This action allows caching build outputs for Gatsby’s Conditional Page Build.
Create a workflow .yml file in your repositories .github/workflows directory. For more information, reference the GitHub Help Documentation for Creating a workflow file.
key - An explicit key for restoring and saving the cache.restore-keys - An ordered list of keys to use for restoring stale cache if no cache hit occurred for key.cache-hit - A boolean value to indicate an exact match was found for the key.Note:
cache-hitwill be set totrueonly when cache hit occurs for the exactkeymatch. For a partial key match viarestore-keysor a cache miss, it will be set tofalse.
This action currently caches the following directories:
.cache (cache of data and rendered assets)public (output of the build process)- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: jongwooo/gatsby-cache@v1
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
Check out Contributing guide for ideas on contributing and setup steps for getting our repositories up.
Licensed under the MIT License.