-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
30 lines (30 loc) · 920 Bytes
/
leetcode_directory_writer.yml
File metadata and controls
30 lines (30 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# The objective of this GitHub Action is to update the leetcode DIRECTORY.md file (if needed)
# when doing a git push
name: leetcode_directory_writer
on:
push:
paths:
- 'leetcode/src/**.cpp'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Add python dependencies
run: |
pip install requests
- name: Write LeetCode DIRECTORY.md
run: |
python3 scripts/leetcode_directory_md.py 2>&1 | tee leetcode/DIRECTORY.md
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
id: commit-push
with:
commit_message: 'docs: updating `leetcode/DIRECTORY.md`'
branch: 'leetcode-directory-${{ github.sha }}'
create_branch: true