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

56 lines
1.5 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:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Format Playlists
run: node scripts/format.js
2021-02-09 08:05:21 +01:00
- name: Commit Changes
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git diff-index --quiet HEAD || git commit -m "[Bot] Format playlists"
2021-02-09 08:05:21 +01:00
git push
2021-02-08 11:53:24 +01:00
generate:
runs-on: ubuntu-latest
2021-02-09 08:05:21 +01:00
needs: format
2021-02-08 11:53:24 +01:00
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- 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-02-08 11:53:24 +01:00
update-readme:
runs-on: ubuntu-latest
needs: generate
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Update README.md
run: node scripts/update-readme.js
2021-02-09 08:05:21 +01:00
- name: Commit Changes
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git diff-index --quiet HEAD || git commit -m "[Bot] Update README.md"
git pull
2021-02-09 08:05:21 +01:00
git push