Skip to content

Commit cb1f08e

Browse files
authored
Update generate-epg.yml
1 parent 7fdb977 commit cb1f08e

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

.github/workflows/generate-epg.yml

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
1-
name: Generate and Update EPG
1+
name: EPG Generator
22

33
on:
4-
schedule:
5-
- cron: '0 0 * * *' # Runs daily at midnight UTC
6-
workflow_dispatch: # Allows manual triggering
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
78

89
jobs:
910
build:
1011
runs-on: ubuntu-latest
1112

1213
steps:
13-
- name: Checkout Repository
14-
uses: actions/checkout@v3
15-
16-
- name: Set up Node.js
17-
uses: actions/setup-node@v3
18-
with:
19-
node-version: '16'
20-
21-
- name: Install Dependencies
22-
run: npm install
23-
24-
- name: Run EPG Generator with Playlist
25-
run: npm run grab -- --playlist https://iptv-org.github.io/iptv/index.m3u
26-
27-
- name: List All Files (Debugging)
28-
run: ls -R
29-
30-
- name: Create Docs Folder and Move EPG
31-
run: |
32-
mkdir -p docs
33-
mv output.xml docs/epg.xml
34-
35-
- name: Commit and Push Changes
36-
run: |
37-
git config user.name "github-actions[bot]"
38-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
39-
git add -A
40-
git commit -m "Update EPG"
41-
git push
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
- name: Checkout Repository
15+
uses: actions/checkout@v3
16+
17+
- name: Set Up Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '16'
21+
22+
- name: Install Dependencies
23+
run: npm install
24+
25+
- name: Run EPG Generator with Playlist
26+
run: npm run grab -- --playlist https://iptv-org.github.io/iptv/index.m3u
27+
28+
- name: Debug: List All Files
29+
run: ls -R
30+
31+
- name: Create Docs Folder and Move EPG
32+
run: |
33+
mkdir -p docs
34+
mv output.xml docs/epg.xml
35+
36+
deploy:
37+
needs: build
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Deploy to GitHub Pages
41+
uses: peaceiris/actions-gh-pages@v3
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
publish_dir: ./docs

0 commit comments

Comments
 (0)