Skip to content

Build JSON

Build JSON #944

Workflow file for this run

name: Build JSON
on:
push:
branches:
- main
schedule:
- cron: '0 9 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Update json
run: |-
python build_json.py
cat blog_links.json
env:
CONSUMER_KEY: ${{secrets.CONSUMER_KEY}}
CONSUMER_SECRET: ${{secrets.CONSUMER_SECRET}}
ACCESS_TOKEN: ${{secrets.ACCESS_TOKEN}}
ACCESS_TOKEN_SECRET: ${{secrets.ACCESS_TOKEN_SECRET}}
BEARER_TOKEN: ${{secrets.BEARER_TOKEN}}
- name: Commit and push if changed
run: |-
git diff
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add -A
git commit -m "Updated content" || exit 0
git push