Skip to content

Commit 5e947ad

Browse files
wip
1 parent f4fd3d9 commit 5e947ad

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

.github/workflows/update-mfp-index-html.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,10 @@ jobs:
2020
python-version: "3.13"
2121
cache: "pip"
2222
- name: Install dependencies
23-
run: pip install -r requirements.txt
23+
run: pip install -r requirements.txt
2424
- name: Run build mfp index.html script and save changes
25+
run: chmod +x commit-changes.sh
2526
run: |
2627
python build-mfp-index-html.py
27-
git diff --quiet index.html
28-
if [ "$?" -eq 1 ]; then
29-
echo "Changes detected in playlist. Publishing..."
30-
git config user.name "github-actions[bot]"
31-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
32-
git add index.html
33-
git commit -m "Update mfp; playlist with latest content."
34-
git push
35-
else
36-
echo "Changes not detected. Skipping..."
37-
fi
28+
./commit-changes.sh
29+

commit-changes.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
git diff --quiet index.html
2+
if [ "$?" -eq 1 ]; then
3+
echo "Changes detected in playlist. Publishing..."
4+
git config user.name "github-actions[bot]"
5+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
6+
git add index.html
7+
git commit -m "Update mfp; playlist with latest content."
8+
git push
9+
else
10+
echo "Changes not detected. Skipping..."
11+
fi

0 commit comments

Comments
 (0)