-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.02 KB
/
parsing.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
41
42
43
44
45
46
47
48
49
name: parsing megabrain blog posts
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "0 20 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up chekcout
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: |
npm install
- name: Run parser
run: |
node puleugo-parser.js
- name: Check if there are any changes
id: verify
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Update or add .md file
if: steps.verify.outputs.changed == 'true'
run: |
git stash
git pull origin master
git stash pop
git add .
git diff
git config --local user.email "[email protected]"
git config --local user.name "singhic"
git commit -m "Fetch. new blog posts"
git push