Blog post workflow #293
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Blog post workflow | |
| on: | |
| schedule: | |
| # Runs once every 3 days | |
| - cron: '0 0 */3 * *' | |
| workflow_dispatch: | |
| jobs: | |
| pull_blog_rss: | |
| name: Update with latest blog posts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Get RSS Feed | |
| uses: kohrongying/readme-the-rss@master | |
| with: | |
| feed_url: https://blogr.conceptcodes.dev/feed.xml | |
| count: 3 # default 5 | |
| - name: Commit file changes | |
| run: | | |
| git config --global user.name 'conceptcodes' | |
| git config --global user.email '[email protected]' | |
| git add . | |
| git diff --quiet --cached || git commit -m "chore(readme): update blog section" | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |