From 689b2c3f0f26315bcfa4a4c41cbe28e1d159cdc3 Mon Sep 17 00:00:00 2001 From: Andrew <91550638+andewmark@users.noreply.github.com> Date: Fri, 14 Feb 2025 19:02:30 -0500 Subject: [PATCH] Create main.yml This will run everyday at 8am to run my main.py script and post daily weather posts onto bluesky! --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..2fef882 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: Run BlueSky Weather Bot + +on: + schedule: + - cron: "0 8 * * *" + workflow_dispatch: + +jobs: + run-weather-bot: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: "3.11" + + - name: Create virtual environment and Install dependencies + run: | + chmod +x setup.sh + ./setup.sh + + - name: Run the script + env: + BLUESKY_HANDLE: ${{ secrets.BLUESKY_HANDLE }} + BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + run: python main.py