You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Gatsby Cache
v1.3.1
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.
use-cache
- A boolean value to enable/disable conditional page build.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-hit
will be set totrue
only when cache hit occurs for the exactkey
match. For a partial key match viarestore-keys
or 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: 18
- uses: jongwooo/gatsby-cache@main
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
Check out Contributing guide for ideas on contributing and setup steps for getting our repositories up.
Licensed under the MIT License.