Skip to content

📝 Adds build and missing recipe docs #230

📝 Adds build and missing recipe docs

📝 Adds build and missing recipe docs #230

Workflow file for this run

name: examples
on:
push:
branches: [main]
paths:
- "examples/**.yml"
- "src/**"
- "copier.yml"
workflow_call:
workflow_dispatch:
concurrency:
group: examples-${{ github.head_ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v3
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
version: "0.4.x"
- name: Setup Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Generate examples
run: |
just generate-examples
- name: Upload examples artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: generated-examples
path: examples/
update-repo:
needs: generate
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download examples artifact
uses: actions/download-artifact@v4
with:
name: generated-examples
path: examples/
- name: Setup Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Get SHA of push commit
id: shortsha
run: echo "shortsha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Commit and push if examples have changed
run: |-
git add -A
git commit -m "Regenerated examples for ${{ steps.shortsha.outputs.shortsha }}" || exit 0
git push