Summary
Create a GitHub Actions workflow that generates example projects from each template variant (language × cloud_service) and pushes them to dedicated branches in a separate showcase repository. This gives users real, browsable code examples for every supported combination without maintaining them manually. The workflow triggers whenever a template changes in the main repo, keeping examples in sync automatically.
Category: ci, documentation
Acceptance Criteria
Implementation Notes
Workflow Structure
name: Generate Examples
on:
push:
branches: [main]
paths:
- 'python/**'
- 'typescript/**'
- 'dotnet/**'
- 'go/**'
jobs:
generate:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- language: python
cloud: "Azure Function App"
branch: python-azure
- language: python
cloud: "GCP Cloud Function"
branch: python-gcp
- language: typescript
cloud: "Azure Function App"
branch: typescript-azure
- language: typescript
cloud: "GCP Cloud Function"
branch: typescript-gcp
- language: dotnet
cloud: "Azure Function App"
branch: dotnet-azure
- language: go
cloud: "Azure Function App"
branch: go-azure
steps:
- uses: actions/checkout@v4
- name: Install Cookiecutter
run: pip install cookiecutter jinja2-strcase
- name: Generate Project
run: |
cookiecutter ./${{ matrix.language }} --no-input \
project_name="ExampleApi" \
cloud_service="${{ matrix.cloud }}"
- name: Push to showcase repo
run: |
# Clone showcase repo, checkout orphan branch, copy files, push
Authentication
- Use a GitHub App or deploy key (not a PAT) for pushing to the showcase repo
- Store credentials as repository secrets
Showcase Repo README
The main branch README links to each branch:
## Examples
| Language | Azure | AWS | GCP |
|----------|-------|-----|-----|
| Python | [python-azure](../../tree/python-azure) | — | [python-gcp](../../tree/python-gcp) |
| TypeScript | [typescript-azure](../../tree/typescript-azure) | — | [typescript-gcp](../../tree/typescript-gcp) |
| ... | ... | ... | ... |
Dynamic Matrix (Future Enhancement)
Instead of hardcoding the matrix, the workflow could parse each cookiecutter.json to dynamically build the matrix of language × cloud combinations. This ensures new cloud options are picked up automatically.
Summary
Create a GitHub Actions workflow that generates example projects from each template variant (language × cloud_service) and pushes them to dedicated branches in a separate showcase repository. This gives users real, browsable code examples for every supported combination without maintaining them manually. The workflow triggers whenever a template changes in the main repo, keeping examples in sync automatically.
Category:
ci,documentationAcceptance Criteria
cookiecutter-api(e.g.,.github/workflows/generate-examples.yaml)mainwhen files underpython/,typescript/,dotnet/, orgo/changecookiecutter --no-inputwith sensible defaultsmainbranch with aREADME.mdthat:{language}-{cloud}(e.g.,python-azure,typescript-gcp,dotnet-aws)cloud_serviceoptions appear in a template'scookiecutter.jsonImplementation Notes
Workflow Structure
Authentication
Showcase Repo README
The
mainbranch README links to each branch:Dynamic Matrix (Future Enhancement)
Instead of hardcoding the matrix, the workflow could parse each
cookiecutter.jsonto dynamically build the matrix of language × cloud combinations. This ensures new cloud options are picked up automatically.