Skip to content

Re-sort Blogs

Re-sort Blogs #283

Workflow file for this run

name: Re-sort Blogs
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * 2,3,5" # At 7:00am on Tuesday, Wednesday, and Friday
jobs:
sort:
name: Re-sort Blogs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Re-sort Blogs
uses: mathiasvr/command-output@v2.0.0
with:
run: bundle exec rake sort:blogs
- name: Check for Changes
run: bash .github/check_for_changes.sh
id: check
- name: Replace blogs.json
if: steps.check.outputs.changes == 'true'
run: mv new_blogs.json blogs.json
- name: Create Pull Request
if: steps.check.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
add-paths: |
blogs.json
commit-message: "Re-sorted blogs."
title: "Re-sorted blogs"
branch: auto-${{ github.run_id }}
delete-branch: true
committer: GitHub <noreply@github.com>
author: GitHub <noreply@github.com>