Tweets #306
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 | |
on: | |
push: | |
branches: [main] | |
schedule: | |
# Run at 3am on Monday, Thursday, and Saturday | |
- cron: "0 3 * * 1,4,6" | |
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 "nimiq" -o "tweets" | |
env: | |
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }} | |
- name: Commit & Push | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: "output/tweets" | |
push: origin main --force |