Skip to content

Split workflows and add cache #1

Split workflows and add cache

Split workflows and add cache #1

Workflow file for this run

name: Build
"on":
push:
branches:
- main
jobs:
build-project:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache Node Modules
uses: actions/cache@v3
with:
path: |
~/.npm
**/node_modules
key: "${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}"
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies and Build Project
env:
FONTAWESOME_NPM_AUTH_TOKEN: "${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}"
run: |
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" "${FONTAWESOME_NPM_AUTH_TOKEN}"
npm ci
npm run build
- uses: actions/upload-artifact@v3
with:
name: aleph-node-metrics-build-artifact
path: out/
id: aleph-node-metrics-build-artifact