-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1 KB
/
update-mfp-index-html.yml
File metadata and controls
37 lines (34 loc) · 1 KB
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
31
32
33
34
35
36
37
name: "Build index.html"
on:
schedule:
- cron: "* */6 * * *"
push:
branches:
- "main"
permissions:
contents: write
jobs:
update-index-html:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run build mfp index.html script and save changes
run: |
python build-mfp-index-html.py
git diff --quiet index.html
if [ "$?" -eq 1 ]; then
echo "Changes detected in playlist. Publishing..."
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add index.html
git commit -m "Update mfp; playlist with latest content."
git push
else
echo "Changes not detected. Skipping..."
fi