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

57 lines
1.6 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
uses: JamesIves/github-pages-deploy-action@master
env:
ACCESS_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
BASE_BRANCH: master
BRANCH: gh-pages
FOLDER: .gh-pages
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"
2021-02-09 08:05:21 +01:00
git push