mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -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
|
||||
- name: 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
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
|
@ -54,10 +37,10 @@ jobs:
|
|||
commit_user_email: 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
|
||||
file_pattern: codes.csv
|
||||
file_pattern: .gh-pages/_items.json .gh-pages/codes.json
|
||||
pull-request:
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
needs: commit-changes
|
||||
needs: update-codes
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -93,3 +76,25 @@ jobs:
|
|||
with:
|
||||
github-token: ${{ secrets.PAT }}
|
||||
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