chore: run LeetCode directory writer on main only

This commit is contained in:
David Leal 2023-06-14 10:18:38 -06:00 committed by GitHub
parent b6b01a3605
commit 8a3ff966e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,8 @@ on:
push:
paths:
- "leetcode/src/**.c"
branches:
- main
jobs:
build:
if: github.repository == 'TheAlgorithms/C' # We only need this to run in our repository.
@ -38,5 +40,6 @@ jobs:
run: |
if [[ `git status --porcelain` ]]; then
gh pr create --base ${GITHUB_REF##*/} --head leetcode-directory-${{ github.sha }} --title 'docs: updating `leetcode/DIRECTORY.md`' --body 'Updated LeetCode directory (see the diff. for changes).'
fi
env:
GH_TOKEN: ${{ github.token }}