Repository navigation
docs(cookbook): sync from OpenHands/enterprise-cookbook #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |