# Example: Simple deployment (push to main → deploy to stage)
# Place in your project's .forgejo/workflows/deploy.yaml

name: Deploy

on:
  push:
    branches: [main]
    paths-ignore:
      - '**.md'
      - 'renovate.json'

jobs:
  deploy-stage:
    uses: Cloonar/ci-templates/.forgejo/workflows/typo3-deploy.yaml@main
    with:
      target: stage
      php_version: '8.3'
    secrets:
      deploy_key: ${{ secrets.STAGE_KEY }}

  # Optional: Manual production deploy
  deploy-production:
    if: github.event_name == 'workflow_dispatch'
    uses: Cloonar/ci-templates/.forgejo/workflows/typo3-deploy.yaml@main
    with:
      target: production
      php_version: '8.3'
    secrets:
      deploy_key: ${{ secrets.PROD_KEY }}
