Skip to content
Merged
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
56 changes: 32 additions & 24 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,9 @@ env:
GATSBY_NEWSLETTER_FORM_ID: 1420

jobs:
update-dependencies:
name: Update node module dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Use Node.js 16.xs
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Restore cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm install
lint:
name: Lint code
runs-on: ubuntu-latest
needs:
- update-dependencies
steps:
- name: Checkout project
uses: actions/checkout@v2
Expand All @@ -57,13 +37,28 @@ jobs:
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Restore cache
cache: 'npm'
- name: Restore node_modules cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
- name: Install
run: npm install
- name: Restore Gatsby cache
uses: actions/cache@v3
with:
# Gatsby requires both .cache and public. It will refuse to use .cache/ if public/ is not present.
path: |
.cache
public
# Cache will not be used by Gatsby if the following files change:
# https://www.gatsbyjs.com/docs/build-caching/
# We use the commit SHA on the key to prevent an ever-living cache entry keyed as "main".
key: pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-${{ github.ref }}-
pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-
- name: Check formatting
run: |
npm run format
Expand Down Expand Up @@ -99,13 +94,26 @@ jobs:
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Restore cache
cache: 'npm'
- name: Restore node_modules cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
- name: Install
run: npm install
- name: Restore Gatsby cache
uses: actions/cache@v3
with:
# Gatsby requires both .cache and public. It will refuse to use .cache/ if public/ is not present.
path: |
.cache
public
# Cache will not be used by Gatsby if the following files change:
# https://www.gatsbyjs.com/docs/build-caching/
key: pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-${{ github.ref }}
restore-keys: |
pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-
- name: Build project
run: npm run build:gatsby
- name: Checks if AWS CLI already installed
Expand Down