Skip to content

Examples

Examples #259

Workflow file for this run

name: Examples
on:
schedule:
- cron: "0 0 * * *"
push:
paths:
- "examples/**"
workflow_dispatch:
inputs:
debug:
description: "Turn on verbose debug output"
type: boolean
default: false
permissions:
contents: read
env:
NODE_ENV: production
RENOUN_DEBUG: ${{ inputs.debug }}
jobs:
examples:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
persist-credentials: false
- name: Detect example changes in last 24 hours
id: detect
run: |
if git log --since="24 hours ago" --pretty=format: --name-only | grep -qE '^examples/'; then
echo "changed=true" >>"$GITHUB_OUTPUT"
else
echo "changed=false" >>"$GITHUB_OUTPUT"
fi
- name: No changes
if: steps.detect.outputs.changed == 'false'
run: echo "No example changes in the last 24 h — skipping."
- name: Setup pnpm
if: steps.detect.outputs.changed == 'true'
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
- name: Setup Node.js
if: steps.detect.outputs.changed == 'true'
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 22
cache: pnpm
- name: Install dependencies
if: steps.detect.outputs.changed == 'true'
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Audit dependencies
run: pnpm audit --prod --audit-level=high
- name: Build
if: steps.detect.outputs.changed == 'true'
env:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
run: pnpm build --filter=@examples/*