Skip to content

Scrape depression tweets #435

Scrape depression tweets

Scrape depression tweets #435

Workflow file for this run

name: Scrape depression tweets
# FYI cron
# ┌────────── minute (0 - 59)
# │ ┌────────── hour (0 - 23)
# │ │ ┌────────── day of the month (1 - 31)
# │ │ │ ┌────────── month (1 - 12)
# │ │ │ │ ┌────────── day of the week (0 - 6)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # @daily
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.9'
cache: 'pip'
- run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Fetch latest data
run: python twitter_scraper.py
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
- name: Push changes # push the output folder to your repo, turn on workflow read and write permission
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true