Skip to content

parsing megabrain blog posts #99

parsing megabrain blog posts

parsing megabrain blog posts #99

Workflow file for this run

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 main
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