Docs. Add singhic blog post #15
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: 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 pull | |
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 |