Skip to content

Update series periodically or upon manual trigger #1507

Update series periodically or upon manual trigger

Update series periodically or upon manual trigger #1507

name: Update series periodically or upon manual trigger
on:
workflow_dispatch:
schedule:
- cron: '0 0,12 * * *'
jobs:
update:
name: Update series
runs-on: ubuntu-latest
steps:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends jq
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
#- name: Checkout twint
# uses: actions/checkout@v3
# with:
# repository: catgirl-v/twint
# path: twint
#- name: Install twint
# run: pip3 install -e .
# working-directory: twint
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Run update script
env:
TWITTER_AUTH_TOKEN: ${{ secrets.TWITTER_AUTH_TOKEN }}
REDDIT_USER: ${{ secrets.REDDIT_USER }}
REDDIT_PASSWD: '${{ secrets.REDDIT_PASSWD }}'
REDDIT_ID: ${{ secrets.REDDIT_ID }}
REDDIT_SECRET: ${{ secrets.REDDIT_SECRET }}
run: ./update_series.sh
- name: Commit changes
run: |
git config --global user.name 'catgirl-bot'
git config --global user.email '<>'
git add series
git commit -m "Update index (beep boop)" || exit 0
git push