Skip to content

docs(cookbook): sync from OpenHands/enterprise-cookbook #11

docs(cookbook): sync from OpenHands/enterprise-cookbook

docs(cookbook): sync from OpenHands/enterprise-cookbook #11

name: Cookbook is generated
# Everything under cookbook/ is generated from OpenHands/enterprise-cookbook by its
# docs-preview and docs-publish workflows, which push only cookbook-preview/* and
# cookbook-sync branches. Any other change would be overwritten by the next sync.
on:
pull_request:
paths:
- 'cookbook/**'
permissions:
contents: read
jobs:
guard:
name: Cookbook pages come from enterprise-cookbook
runs-on: ubuntu-latest
steps:
- name: Allow only the enterprise-cookbook sync branches
env:
HEAD_REF: ${{ github.head_ref }}
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
run: |
if [ "$HEAD_REPO" = "$GITHUB_REPOSITORY" ]; then
case "$HEAD_REF" in
cookbook-sync|cookbook-preview/*) echo "Generated update from OpenHands/enterprise-cookbook."; exit 0 ;;
esac
fi
echo "::error::Pages under cookbook/ are generated from OpenHands/enterprise-cookbook. Change the example's README.md or example.yaml there instead: https://github.com/OpenHands/enterprise-cookbook/tree/main/tools/docs-render"
exit 1