-
-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (34 loc) · 931 Bytes
/
crawler.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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