Development #5
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: Block suggestion folders from main | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| check-forbidden-paths: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prevent suggestion folders being merged into main | |
| run: | | |
| FORBIDDEN_PATHS=( | |
| "splitleaf-data/texts/suggestions/" | |
| "splitleaf-data/tunes/suggestions/" | |
| ) | |
| for path in "${FORBIDDEN_PATHS[@]}"; do | |
| if git diff --name-only origin/main...HEAD | grep "^${path}"; then | |
| echo "❌ Files in ${path} are development-only and must not be merged into main." | |
| exit 1 | |
| fi | |
| done |