Skip to content

ci experiment: cache monorepo build #1

ci experiment: cache monorepo build

ci experiment: cache monorepo build #1

name: Build
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-monorepo:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- name: Checkout monorepo
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup node
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: 'Cache build'
- uses: 'actions/cache@v3'
with:
path: '.'
key: '${{ runner.os }}-node-18-${{ git rev-parse HEAD }}'
restore-keys: '${{ runner.os }}-node-18'
- run: npm i