Skip to content

Commit

Permalink
Merge pull request #15 from wp-graphql/improve-gh-actions
Browse files Browse the repository at this point in the history
Improve readability and update to latest versions
  • Loading branch information
josephfusco authored Oct 18, 2023
2 parents c6c6d6f + d5114b8 commit e5a7819
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,42 @@
name: Build
on: pull_request

on:
pull_request:
paths-ignore:
- '**/*.md'

jobs:
build:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest

strategy:
matrix:
node: ["16", "18"]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout code
uses: actions/checkout@v3

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: cp .env.local.sample .env.local
- run: npm run build
continue-on-error: FALSE

- name: Install and Build
run: |
npm ci
cp .env.local.sample .env.local
npm run build
- name: Error handling
if: failure()
run: echo "Build failed!"

1 comment on commit e5a7819

@headless-platform-by-wp-engine

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out the recent updates to your Atlas environment:

App Environment URL Build
acf.wpgraphql.com main https://hb…wered.com ✅ (logs)

Learn more about building on Atlas in our documentation.

Please sign in to comment.