Fix pages deployment action #3
This file contains 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: Main Branch Protection | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
check-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check branch | |
run: | | |
if [[ ${GITHUB_HEAD_REF} != development ]] && ! [[ ${GITHUB_HEAD_REF} =~ ^hotfix/ ]]; | |
then | |
echo "Error: Pull request must come from 'development' or 'hotfix/' branch" | |
exit 1 | |
fi |