mirror of
https://github.com/iptv-org/iptv.git
synced 2024-09-05 00:01:35 +02:00
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
name: auto-update
|
|
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
|
|
- 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"
|
|
git push
|
|
generate:
|
|
runs-on: ubuntu-latest
|
|
needs: format
|
|
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
|
|
- 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
|
|
git push
|