Histor/media placeholder #231
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Templates | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'templates/**' | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
paths: | |
- 'templates/**' | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.18.x] | |
template: | |
- plate-template | |
- plate-playground-template | |
defaults: | |
run: | |
working-directory: templates/${{ matrix.template }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/[email protected] | |
name: Install pnpm | |
with: | |
version: 8.6.1 | |
run_install: false | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
cache-dependency-path: '**/pnpm-lock.yaml' | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
name: ♻️ Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: 📥 Install | |
run: pnpm install --no-frozen-lockfile | |
- name: 🏗 Run build | |
run: pnpm build |