Skip to content

actually fix demo

actually fix demo #27

Workflow file for this run

name: Build
# not technically necessary because release also runs tests but this way the build badge is separate
env:
USE_LOCKFILE: ${{ secrets.USE_LOCKFILE }}
on:
#TOCONFIGURE
# schedule:
# # every first of the month at 12:00 noon GMT-3
# # https://crontab.guru/#0_12_1_*_*
# - cron: '0 15 1 * *'
push:
branches: [ master ]
repository_dispatch:
types: [ build ]
jobs:
build:
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["lts/*", "latest"]
steps:
# region Setup
- uses: actions/checkout@v2
- name: Setting Up Node.js (${{ matrix.node-version }})
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: latest
- name: Get Pnpm Cache Path
id: pnpm-cache
run: |
echo "::set-output name=dir::$(pnpm store path)"
- uses: actions/cache@v3
name: pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: "echo Cache Key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
- run: "echo Cache Restore-Keys: ${{ runner.os }}-pnpm-store-"
- run: "echo Pnpm Cache Hit: ${{ steps.pnpm-cache.outputs.cache-hit }}"
# regionend
# region Steps
- run: pnpm install --frozen-lockfile
if: "env.USE_LOCKFILE == 'true'"
- run: pnpm install --no-lockfile
if: "env.USE_LOCKFILE != 'true'"
- run: pnpm build
- run: pnpm lint
- run: pnpm test
# regionend