Skip to content

Commit

Permalink
chore: updated github action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewcourtice committed Mar 20, 2023
1 parent 100e376 commit 6ebb06c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,31 @@ on:
jobs:

build_and_test:
name: Build and Test Harlem
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3

- name: Prepare NodeJS
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16.x

# Get yarn cache directory path
- name: Get Yarn Cache Path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v2
# Node module and yarn cache
- name: Yarn Cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-harlem-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-harlem-
- name: Install Dependencies
run: yarn install
Expand All @@ -43,7 +48,7 @@ jobs:
run: yarn test

- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
Expand All @@ -61,7 +66,7 @@ jobs:
# reporter: jest-junit

- name: Upload Test Results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: test-results
path: test-results.xml
19 changes: 12 additions & 7 deletions .github/workflows/publish-demo-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,31 @@ on:
jobs:

build_and_publish:
name: Build and Publish Demo App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3

- name: Prepare NodeJS
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16.x

# Get yarn cache directory path
- name: Get Yarn Cache Path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v2
# Node module and yarn cache
- name: Yarn Cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-harlem-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-harlem-
- name: Install Dependencies
run: yarn install
Expand All @@ -43,7 +48,7 @@ jobs:
# please check out the docs of the workflow for more details
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: demo
build_dir: app/dist
Expand Down

0 comments on commit 6ebb06c

Please sign in to comment.