Skip to content

Commit 6b75bb8

Browse files
committed
enable incremental builds in prod as well
1 parent ca92d4b commit 6b75bb8

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/production.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
GATSBY_DEFAULT_MAIN_URL: https://${{ secrets.PROD_CI_MAIN_URL }}
2323
GATSBY_DRIFT_API: ${{ secrets.PROD_CI_GATSBY_DRIFT_API }}
2424
GATSBY_GOOGLE_API_KEY: ${{ secrets.PROD_CI_GATSBY_GOOGLE_API_KEY }}
25+
2526
jobs:
2627
update-dependencies:
2728
name: Update node module dependencies
@@ -41,6 +42,7 @@ jobs:
4142
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
4243
- name: Install dependencies
4344
run: npm install
45+
4446
lint:
4547
name: Lint code and prose
4648
runs-on: ubuntu-latest
@@ -67,12 +69,12 @@ jobs:
6769
export PATH="./bin:$PATH"
6870
vale -v
6971
- name: Lint code
70-
run: |
71-
npm run lint
72+
run: npm run lint
7273
- name: Lint prose
7374
run: |
7475
export PATH="./bin:$PATH"
7576
npm run lint:prose
77+
7678
build-deploy-prod:
7779
name: Build and deploy to prod
7880
runs-on: ubuntu-latest
@@ -93,8 +95,18 @@ jobs:
9395
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
9496
- name: Install dependencies
9597
run: npm install
98+
- name: Gatsby Cache Folder
99+
uses: actions/cache@v1
100+
with:
101+
key: gatsby-cache-folder
102+
path: .cache
103+
- name: Gatsby Public Folder
104+
uses: actions/cache@v1
105+
with:
106+
key: gatsby-public-folder
107+
path: public
96108
- name: Build project
97-
run: npm run build
109+
run: npm run build:incremental
98110
- name: Install AWS CLI dependencies
99111
run: sudo apt-get update && sudo apt-get -y install python-pip python-dev
100112
- name: Install AWS CLI

0 commit comments

Comments
 (0)