Update Blog Archive #5531
This file contains 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: Update Blog Archive | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 */12 * * *' | |
jobs: | |
update_blog_archive: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
- name: Build and Run Blog Crawler | |
run: | | |
go build -o blog_crawler | |
./blog_crawler | |
- name: Check for Changes | |
id: check_changes | |
run: | | |
git diff --exit-code || echo "changes" > changes_detected | |
- name: Auto Commit and Push Changes | |
if: steps.check_changes.outputs.changes_detected == 'changes' | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "Update xargin_blogs.md" | |
branch: master | |
push_options: --force |