iptv/.github/workflows/auto-update.yml

72 lines
1.9 KiB
YAML
Raw Normal View History

2021-02-08 12:05:46 +01:00
name: auto-update
2021-02-08 11:53:24 +01:00
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
2021-05-26 14:58:54 +02:00
remove-duplicates:
2021-05-06 15:24:54 +02:00
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Remove Duplicates
run: node scripts/remove-duplicates.js
2021-05-26 14:58:54 +02:00
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: channels
path: channels/
format:
runs-on: ubuntu-latest
needs: remove-duplicates
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
- name: Install Dependencies
run: npm install
2021-02-08 11:53:24 +01:00
- name: Format Playlists
2021-05-07 02:37:00 +02:00
run: node scripts/format.js
2021-05-26 14:58:54 +02:00
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: channels
path: channels/
generate:
runs-on: ubuntu-latest
needs: format
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
- name: Install Dependencies
run: npm install
2021-02-08 11:53:24 +01:00
- name: Generate Playlists
run: node scripts/generate.js
- name: Deploy to GitHub Pages
2021-04-17 02:47:33 +02:00
uses: JamesIves/github-pages-deploy-action@4.1.1
2021-04-17 02:53:32 +02:00
with:
branch: gh-pages
folder: .gh-pages
2021-05-26 14:58:54 +02:00
update-readme:
runs-on: ubuntu-latest
needs: generate
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
- name: Install Dependencies
run: npm install
2021-02-08 11:53:24 +01:00
- name: Update README.md
run: node scripts/update-readme.js
2021-05-26 14:58:54 +02:00
- name: Upload Artifact
uses: actions/upload-artifact@v2
2021-05-26 14:37:13 +02:00
with:
2021-05-26 14:58:54 +02:00
name: README.md
path: README.md