Regularly forecast new questions #51
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: Daily Build Simple Bot | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 15 * * *" # every day, 11:00 EST | |
# Daily job to run the simple forecast bot | |
jobs: | |
daily_build: | |
runs-on: ubuntu-latest #determines the machine that will run the job - keep as is | |
steps: # sets up the steps that will be run in order | |
# setup repository with all necessary dependencies - keep as is | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-root # note that this will install dependencies for the main bot, which is a bit more than what's needed for the simple bot. But that shouldn't matter much. | |
# run your bot | |
- name: Run bot | |
run: | | |
poetry run python simple-forecast-bot.py | |
# this reads the environment variables from the github repository. | |
# Store under Settings --> Secrets and variables --> Actions | |
env: | |
METACULUS_TOKEN: ${{ secrets.METACULUS_TOKEN }} # replace this with the name of the variable under which you stored your own Metaculus token | |
PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |