Tweets criptocity #64
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: Tweets criptocity | |
on: | |
push: | |
branches: [main] | |
schedule: | |
# Run at 3am on Tuesday | |
- cron: "0 3 * * 2" | |
workflow_dispatch: | |
jobs: | |
tweets: | |
runs-on: ubuntu-latest | |
timeout-minutes: 8 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
cache: "pip" | |
- name: Install PyTorch | |
run: | | |
python -m pip install --upgrade pip | |
# Install CPU-based pytorch | |
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html | |
- name: Main script | |
run: | | |
python3 -m pip install -r requirements.txt | |
python3 ./src/tweets.py -q "criptociudad" -o "criptocity/san-jose" | |
env: | |
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }} | |
- name: Commit & Push | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: "output/criptocity" | |
push: origin main --force |