Update auto-update.yml
This commit is contained in:
parent
83a2c48457
commit
ed769af99b
|
@ -4,49 +4,33 @@ on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
jobs:
|
jobs:
|
||||||
remove-duplicates:
|
update:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Install Dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Remove Duplicates
|
- name: Remove Duplicates
|
||||||
run: node scripts/remove-duplicates.js
|
run: node scripts/remove-duplicates.js
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
run: |
|
run: |
|
||||||
git config user.name github-actions
|
|
||||||
git config user.email github-actions@github.com
|
|
||||||
git add channels/*
|
git add channels/*
|
||||||
git diff-index --quiet HEAD || git commit -m "[Bot] Remove duplicates"
|
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
|
- name: Format Playlists
|
||||||
run: node scripts/format.js
|
run: node scripts/format.js
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
run: |
|
run: |
|
||||||
git config user.name github-actions
|
|
||||||
git config user.email github-actions@github.com
|
|
||||||
git add channels/*
|
git add channels/*
|
||||||
git diff-index --quiet HEAD || git commit -m "[Bot] Format playlists"
|
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
|
- name: Generate Playlists
|
||||||
run: node scripts/generate.js
|
run: node scripts/generate.js
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
|
@ -54,21 +38,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
branch: gh-pages
|
branch: gh-pages
|
||||||
folder: .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
|
- name: Update README.md
|
||||||
run: node scripts/update-readme.js
|
run: node scripts/update-readme.js
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
run: |
|
run: |
|
||||||
git config user.name github-actions
|
|
||||||
git config user.email github-actions@github.com
|
|
||||||
git add README.md
|
git add README.md
|
||||||
git diff-index --quiet HEAD || git commit -m "[Bot] Update README.md"
|
git diff-index --quiet HEAD || git commit -m "[Bot] Update README.md"
|
||||||
git pull
|
|
||||||
git push
|
|
||||||
|
|
Loading…
Reference in New Issue