Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build speed improvements #157

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,26 @@ jobs:
if: steps.cache-pullquotes-modules.outputs.cache-hit != 'true'
run: cd site/plugins/gatsby-remark-transformer-pullquotes && npm install

- name: Public output cache
id: cache-build
- name: Public output
id: public-build
uses: actions/cache@v3
with:
path: ./site/public
key: site-public-${{hashFiles('**/site/**')}}
restore-keys: site-public-${{hashFiles('**/site/**')}}
key: site-public-${{hashFiles('**/site/public/**')}}
restore-keys: site-public-

- name: Gatsby Cache output
id: cache-build
uses: actions/cache@v3
with:
path: ./site/.cache
key: site-cache-${{hashFiles('**/site/.cache/**')}}
restore-keys: site-cache-

- name: Build output files
run: make build
env:
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true

- name: Configure AWS CLI
uses: aws-actions/configure-aws-credentials@v1
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test:

build:
@echo "build: Build files for deploy"
cd ./site && ./node_modules/.bin/gatsby build
cd ./site && ./node_modules/.bin/gatsby build --log-pages

deploy:
@echo "Deploying the application"
Expand Down