Skip to content

Remove section from docs [deploy-site] #39

Remove section from docs [deploy-site]

Remove section from docs [deploy-site] #39

name: Enforce Branch Policy
on:
pull_request:
push:
workflow_dispatch:
jobs:
enforce-branch-policy:
runs-on: ubuntu-latest
steps:
- name: Check for push event
if: github.event_name == 'push'
run: |
echo "Push events allowed."
exit 0
- name: Enforce main branch policy
if: github.ref == 'refs/heads/main'
run: |
echo "Pull requests to the main branch are not allowed."
exit 1
- name: Enforce develop branch policy
if: github.ref != 'refs/heads/main'
run: |
echo "Pull requests to the develop branch are allowed."
exit 0