|
|
@ -4,8 +4,22 @@ on:
|
|
|
|
schedule:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0,12 * * *'
|
|
|
|
- cron: '0 0,12 * * *'
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
delete-old-branch:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
ref: ${{ github.ref }}
|
|
|
|
|
|
|
|
- name: Delete Branch
|
|
|
|
|
|
|
|
uses: dawidd6/action-delete-branch@v3
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
branches: 'bot/auto-update'
|
|
|
|
create-branch:
|
|
|
|
create-branch:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs: delete-old-branch
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
uses: actions/checkout@v2
|
|
|
@ -27,6 +41,11 @@ jobs:
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
ref: bot/auto-update
|
|
|
|
ref: bot/auto-update
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
cache: 'npm'
|
|
|
|
- name: Install Dependencies
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Create Matrix
|
|
|
|
- name: Create Matrix
|
|
|
@ -46,10 +65,15 @@ jobs:
|
|
|
|
ref: bot/auto-update
|
|
|
|
ref: bot/auto-update
|
|
|
|
- name: Setup FFmpeg
|
|
|
|
- name: Setup FFmpeg
|
|
|
|
uses: FedericoCarboni/setup-ffmpeg@v1
|
|
|
|
uses: FedericoCarboni/setup-ffmpeg@v1
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
cache: 'npm'
|
|
|
|
- name: Install Dependencies
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Format Playlists
|
|
|
|
- name: Format Playlists
|
|
|
|
run: node scripts/format.js --country=${{ matrix.country }} --debug
|
|
|
|
run: node scripts/format.js --country=${{ matrix.country }} --timeout=60000 --debug
|
|
|
|
- name: Upload Artifact
|
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
with:
|
|
|
@ -85,6 +109,11 @@ jobs:
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
ref: bot/auto-update
|
|
|
|
ref: bot/auto-update
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
cache: 'npm'
|
|
|
|
- name: Install Dependencies
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Remove Duplicates
|
|
|
|
- name: Remove Duplicates
|
|
|
@ -106,6 +135,11 @@ jobs:
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
ref: bot/auto-update
|
|
|
|
ref: bot/auto-update
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
cache: 'npm'
|
|
|
|
- name: Install Dependencies
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Sort Channels
|
|
|
|
- name: Sort Channels
|
|
|
@ -127,6 +161,11 @@ jobs:
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
ref: bot/auto-update
|
|
|
|
ref: bot/auto-update
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
cache: 'npm'
|
|
|
|
- name: Install Dependencies
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Filter Playlists
|
|
|
|
- name: Filter Playlists
|
|
|
@ -148,6 +187,11 @@ jobs:
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
ref: bot/auto-update
|
|
|
|
ref: bot/auto-update
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
cache: 'npm'
|
|
|
|
- name: Install Dependencies
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Generate Playlists
|
|
|
|
- name: Generate Playlists
|
|
|
@ -158,7 +202,6 @@ jobs:
|
|
|
|
name: gh-pages
|
|
|
|
name: gh-pages
|
|
|
|
path: .gh-pages/
|
|
|
|
path: .gh-pages/
|
|
|
|
deploy:
|
|
|
|
deploy:
|
|
|
|
if: ${{ github.ref == 'refs/heads/master' }}
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: generate
|
|
|
|
needs: generate
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
@ -178,6 +221,7 @@ jobs:
|
|
|
|
app_id: ${{ secrets.APP_ID }}
|
|
|
|
app_id: ${{ secrets.APP_ID }}
|
|
|
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
|
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
|
|
|
|
if: ${{ github.ref == 'refs/heads/master' }}
|
|
|
|
uses: JamesIves/github-pages-deploy-action@4.1.1
|
|
|
|
uses: JamesIves/github-pages-deploy-action@4.1.1
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
branch: gh-pages
|
|
|
|
branch: gh-pages
|
|
|
@ -194,6 +238,11 @@ jobs:
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
ref: bot/auto-update
|
|
|
|
ref: bot/auto-update
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
cache: 'npm'
|
|
|
|
- name: Install Dependencies
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Update README.md
|
|
|
|
- name: Update README.md
|
|
|
|