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