diff --git a/.github/workflows/main.yml b/.github/workflows/format.yml similarity index 80% rename from .github/workflows/main.yml rename to .github/workflows/format.yml index 4c24bb4220..a0e5e678c0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/format.yml @@ -1,4 +1,4 @@ -name: Generate grouped playlists +name: Format playlists on: push: @@ -22,14 +22,11 @@ jobs: - name: "npm run format" run: npm run format - - name: "npm run generate" - run: npm run generate - - name: Commit all changes uses: stefanzweifel/git-auto-commit-action@v2.0.0 with: commit_author_email: free.arhey@gmail.com commit_author_name: Arhey - commit_message: Generate grouped playlists + commit_message: Formatted playlists env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml new file mode 100644 index 0000000000..7581905cb0 --- /dev/null +++ b/.github/workflows/generate.yml @@ -0,0 +1,29 @@ +name: Generate grouped playlists + +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 generate" + run: npm run generate + + - name: Commit all changes + uses: stefanzweifel/git-auto-commit-action@v2.0.0 + with: + commit_author_email: free.arhey@gmail.com + commit_author_name: Arhey + commit_message: Generated grouped playlists + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}