Skip to content

Publish thread

Publish thread #15616

name: Publish thread
on:
schedule:
- cron: '0 * * * *'
jobs:
publish_thread:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Run image
uses: abatilo/actions-poetry@v2.1.3
with:
poetry-version: 1.1.11
- name: Install dependencies
run: poetry install --no-dev
- name: Run crawlers
run: |
chmod +x ./scripts/run_crawlers.sh
./scripts/run_crawlers.sh
- name: Publish thread
run: |
chmod +x ./scripts/publish_thread.sh
./scripts/publish_thread.sh
env:
CONSUMER_KEY: ${{ secrets.CONSUMER_KEY }}
CONSUMER_SECRET: ${{ secrets.CONSUMER_SECRET }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
- name: Commit and push changes
run: |
git diff
git config --global user.email "dscleo@gmail.com"
git config --global user.name "Leonardo Diegues"
git add -A
git commit -m "Updated headlines" || exit 0
git push