diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 6190decf..36fb4fca 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -55,7 +55,6 @@ jobs: path: .gh-pages/guides/${{ matrix.country }}.epg.xml if-no-files-found: error deploy: - if: ${{ github.ref == 'refs/heads/master' }} needs: grab runs-on: ubuntu-latest steps: @@ -72,6 +71,7 @@ jobs: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PRIVATE_KEY }} - name: Deploy to GitHub Pages + if: ${{ github.ref == 'refs/heads/master' }} uses: JamesIves/github-pages-deploy-action@4.1.1 with: branch: gh-pages @@ -101,6 +101,7 @@ jobs: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PRIVATE_KEY }} - name: Deploy to GitHub Pages + if: ${{ github.ref == 'refs/heads/master' }} uses: JamesIves/github-pages-deploy-action@4.1.1 with: branch: gh-pages @@ -112,7 +113,7 @@ jobs: commit-message: '[Bot] Deploy to GitHub Pages' update-readme: runs-on: ubuntu-latest - needs: grab + needs: deploy steps: - name: Checkout uses: actions/checkout@v2 @@ -131,15 +132,6 @@ jobs: commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>' branch: bot/auto-update file_pattern: README.md - pull-request: - if: ${{ github.ref == 'refs/heads/master' }} - needs: update-readme - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: bot/auto-update - name: Generate Token uses: tibdex/github-app-token@v1 id: generate-token @@ -152,13 +144,14 @@ jobs: with: source_branch: 'bot/auto-update' destination_branch: 'master' - pr_title: '[Bot] Update playlists' + pr_title: '[Bot] Update guides' pr_body: | This pull request is created by [auto-update][1] workflow. [1]: https://github.com/iptv-org/epg/actions/runs/${{ github.run_id }} github_token: ${{ steps.generate-token.outputs.token }} - name: Merge Pull Request + if: ${{ github.ref == 'refs/heads/master' }} uses: juliangruber/merge-pull-request-action@v1 with: github-token: ${{ secrets.PAT }}