Update auto-update.yml
This commit is contained in:
parent
83a2c48457
commit
ed769af99b
|
@ -4,49 +4,33 @@ on:
|
|||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
jobs:
|
||||
remove-duplicates:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Update Config
|
||||
run: |
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
- name: Create Branch
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
git checkout bot/auto-update || git checkout -b bot/auto-update
|
||||
- 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 channels/*
|
||||
git diff-index --quiet HEAD || git commit -m "[Bot] Remove duplicates"
|
||||
git pull
|
||||
git push
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
needs: remove-duplicates
|
||||
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 channels/*
|
||||
git diff-index --quiet HEAD || git commit -m "[Bot] Format playlists"
|
||||
git pull
|
||||
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
|
||||
|
@ -54,21 +38,9 @@ jobs:
|
|||
with:
|
||||
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 README.md
|
||||
git diff-index --quiet HEAD || git commit -m "[Bot] Update README.md"
|
||||
git pull
|
||||
git push
|
||||
|
|
Loading…
Reference in New Issue