mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update update-codes.yml
This commit is contained in:
parent
52dbbf87c2
commit
daf5b07af3
1 changed files with 24 additions and 19 deletions
43
.github/workflows/update-codes.yml
vendored
43
.github/workflows/update-codes.yml
vendored
|
@ -29,23 +29,6 @@ jobs:
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Update Codes
|
- name: Update Codes
|
||||||
run: npm run update-codes
|
run: npm run update-codes
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: codes.csv
|
|
||||||
path: codes.csv
|
|
||||||
commit-changes:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: update-codes
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
ref: bot/update-codes
|
|
||||||
- name: Download Artifacts
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: codes.csv
|
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
with:
|
with:
|
||||||
|
@ -54,10 +37,10 @@ jobs:
|
||||||
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
||||||
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
||||||
branch: bot/update-codes
|
branch: bot/update-codes
|
||||||
file_pattern: codes.csv
|
file_pattern: .gh-pages/_items.json .gh-pages/codes.json
|
||||||
pull-request:
|
pull-request:
|
||||||
if: ${{ github.ref == 'refs/heads/master' }}
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
needs: commit-changes
|
needs: update-codes
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -93,3 +76,25 @@ jobs:
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PAT }}
|
github-token: ${{ secrets.PAT }}
|
||||||
number: ${{ steps.pr.outputs.pr_number }}
|
number: ${{ steps.pr.outputs.pr_number }}
|
||||||
|
deploy:
|
||||||
|
needs: pull-request
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Generate Token
|
||||||
|
uses: tibdex/github-app-token@v1
|
||||||
|
id: generate-token
|
||||||
|
with:
|
||||||
|
app_id: ${{ secrets.APP_ID }}
|
||||||
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
uses: JamesIves/github-pages-deploy-action@4.1.1
|
||||||
|
with:
|
||||||
|
branch: gh-pages
|
||||||
|
folder: .gh-pages
|
||||||
|
clean: false
|
||||||
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
git-config-name: iptv-bot
|
||||||
|
git-config-email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
||||||
|
commit-message: '[Bot] Deploy to GitHub Pages'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue