Update auto-update.yml

This commit is contained in:
Aleksandr Statciuk 2021-10-03 16:57:49 +03:00
parent fdb2f54762
commit 2a67e2b474

View file

@ -1,8 +1,8 @@
name: auto-update name: auto-update
on: on:
workflow_dispatch: workflow_dispatch:
schedule: # schedule:
- cron: '0 0 * * *' # - cron: '0 0 * * *'
jobs: jobs:
grab: grab:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -10,80 +10,84 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
site: site: [
[ # andorradifusio.ad,
andorradifusio.ad, # arianaafgtv.com,
arianaafgtv.com, # arianatelevision.com,
arianatelevision.com, # astro.com.my,
astro.com.my, # comteco.com.bo,
comteco.com.bo, # cosmote.gr,
cosmote.gr, # digiturk.com.tr,
digiturk.com.tr, # dstv.com,
dstv.com, # elcinema.com,
elcinema.com, # guidatv.sky.it,
guidatv.sky.it, # hd-plus.de,
hd-plus.de, # m.tv.sms.cz,
m.tv.sms.cz, # maxtv.hrvatskitelekom.hr,
maxtv.hrvatskitelekom.hr, # mediaset.it,
mediaset.it, # meo.pt,
meo.pt, # mi.tv,
mi.tv, # mncvision.id,
mncvision.id, # ontvtonight.com,
ontvtonight.com, # programacion-tv.elpais.com,
programacion-tv.elpais.com, # programetv.ro,
programetv.ro, # programme-tv.net,
programme-tv.net, # programtv.onet.pl,
programtv.onet.pl, # rev.bs,
rev.bs, # telkussa.fi,
telkussa.fi, # tv.cctv.com,
tv.cctv.com, # tv.lv,
tv.lv, # tv.mail.ru,
tv.mail.ru, # tv.yandex.ru,
tv.yandex.ru, # tvgid.ua,
tvgid.ua, # tvguide.com,
tvguide.com, # tvprofil.com,
tvprofil.com, tvtv.us
tvtv.us, # vidio.com,
vidio.com, # zap.co.ao,
zap.co.ao, # znbc.co.zm
znbc.co.zm
] ]
include:
- site: tvtv.us
region: _us
- site: tvtv.us
region: _ca
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install Dependencies - name: Install Dependencies
run: npm install run: npm install
- name: Run EPG Grabber - name: Run EPG Grabber
run: npx epg-grabber --config=sites/${{ matrix.site }}.config.js run: npx epg-grabber --config=sites/${{ matrix.site }}.config.js --channels=sites/${{ matrix.site }}${{ matrix.region }}.channels.xml --output=.gh-pages/guides/${{ matrix.site }}${{ matrix.region }}.guide.xml
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: .gh-pages name: .gh-pages
path: .gh-pages/guides/${{ matrix.site }}.guide.xml path: .gh-pages/guides/${{ matrix.site }}.guide.xml
if-no-files-found: error if-no-files-found: error
deploy: # deploy:
if: ${{ github.ref == 'refs/heads/master' }} # if: ${{ github.ref == 'refs/heads/master' }}
needs: grab # needs: grab
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
- name: Download Artifacts # - name: Download Artifacts
uses: actions/download-artifact@v2 # uses: actions/download-artifact@v2
- name: Generate Token # - name: Generate Token
uses: tibdex/github-app-token@v1 # uses: tibdex/github-app-token@v1
id: generate-token # id: generate-token
with: # with:
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
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
folder: .gh-pages # folder: .gh-pages
target-folder: guides # target-folder: guides
clean: false # clean: false
token: ${{ steps.generate-token.outputs.token }} # token: ${{ steps.generate-token.outputs.token }}
git-config-name: iptv-bot # git-config-name: iptv-bot
git-config-email: 84861620+iptv-bot[bot]@users.noreply.github.com # git-config-email: 84861620+iptv-bot[bot]@users.noreply.github.com
commit-message: '[Bot] Deploy to GitHub Pages' # commit-message: '[Bot] Deploy to GitHub Pages'