mirror of
https://github.com/ariqnrnns/zauberhaft-astro.git
synced 2025-04-20 06:51:53 +02:00
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
# This workflow will do a clean installation of node dependencies, cache/restore them & build the source code across node 16, node 17, & node 18.
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
|
|
|
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: main
|
|
pull_request:
|
|
branches: main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [16.x, 17.x, 18.x]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: cache node modules
|
|
uses: actions/cache@v3
|
|
env:
|
|
cache-name: cache-node-modules
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
${{ runner.os }}-build-
|
|
${{ runner.os }}-
|
|
- name: install dependencies
|
|
run: npm install
|
|
- name: build
|
|
run: npm run build
|