From 970c0eaea13aa025e1f7ba93b1d1be84c41b752e Mon Sep 17 00:00:00 2001 From: freearhey Date: Sun, 3 Nov 2019 13:08:11 +0300 Subject: [PATCH] Create publish.yml --- .github/workflows/publish.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000000..ce73d0f64e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,44 @@ +name: Publish playlists + +on: + schedule: + - cron: '*/5 * * * *' + +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: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BASE_BRANCH: master + BRANCH: gh-pages + FOLDER: .gh-pages + BUILD_SCRIPT: npm install && npm run generate + update-readme: + runs-on: ubuntu-latest + needs: generate + 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_LABELS: automerge + PULL_REQUEST_BODY: > + This pull request is auto-generated by GitHub action.