diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml deleted file mode 100644 index 2b35ac717..000000000 --- a/.github/workflows/auto-update.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: auto-update - -on: - schedule: - - cron: '0 0 * * *' - -jobs: - generate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - - name: "git checkout master" - run: git checkout master - - - name: "npm install" - run: npm install - - - name: "npm run format --epg" - run: npm run format --epg - - - name: "npm run generate" - run: npm run generate - - - name: "npm run update-readme" - run: npm run update-readme - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v1.5.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COMMIT_MESSAGE: 'Auto-update repository' - PULL_REQUEST_BRANCH: auto-update/patch - PULL_REQUEST_TITLE: '[Bot] Auto-update repository' - PULL_REQUEST_BODY: > - This pull request is auto-generated by auto-update action. diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 000000000..c950f8cd6 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,32 @@ +name: Format Playlists + +on: + push: + branches: + - master + paths: + - 'channels/*' + - 'index.m3u' + +jobs: + generate: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Install Dependencies + run: npm install + + - name: Format Playlists + run: npm run format --epg + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v1.5.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMIT_MESSAGE: 'Format playlists' + PULL_REQUEST_BRANCH: bot-patch + PULL_REQUEST_TITLE: '[Bot] Format playlists' + PULL_REQUEST_BODY: > + This pull request is auto-generated by GitHub action. diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml new file mode 100644 index 000000000..35d4950d6 --- /dev/null +++ b/.github/workflows/generate.yml @@ -0,0 +1,21 @@ +name: Generate Playlists and Deploy + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + generate: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Generate Playlists and Deploy + uses: JamesIves/github-pages-deploy-action@master + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + BASE_BRANCH: master + BRANCH: gh-pages + FOLDER: .gh-pages + BUILD_SCRIPT: npm install && npm run generate diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml new file mode 100644 index 000000000..f903d83ff --- /dev/null +++ b/.github/workflows/update-readme.yml @@ -0,0 +1,28 @@ +name: Update README.md + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + generate: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Install Dependencies + run: npm install + + - name: Update README.md + run: npm run update-readme + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v1.5.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMIT_MESSAGE: 'Update README.md' + PULL_REQUEST_BRANCH: bot-patch + PULL_REQUEST_TITLE: '[Bot] Update README.md' + PULL_REQUEST_BODY: > + This pull request is auto-generated by GitHub action.