Skip to content

Build

Build #38

Workflow file for this run

name: Build
on:
workflow_dispatch:
schedule:
# Run 3 times a day, centered around internet peak hours:
# - 9:00 UTC (morning), 15:00 UTC (afternoon), 21:00 UTC (evening)
- cron: '0 9,15,21 * * *'
concurrency:
group: ci-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
# Check out the repository
- uses: actions/checkout@v4
with:
show-progress: false
# Install project dependencies
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python
run: uv python install
# Run the build script
- name: Create .env file
run: |
echo "DATABASE_URL=${{ secrets.DATABASE_URL }}" >> .env
echo "CLOUDFLARE_EMAIL=${{ secrets.CLOUDFLARE_EMAIL }}" >> .env
echo "CLOUDFLARE_API_KEY=${{ secrets.CLOUDFLARE_API_KEY }}" >> .env
echo "CLOUDFLARE_DATABASE_ID=${{ secrets.CLOUDFLARE_DATABASE_ID }}" >> .env
echo "CLOUDFLARE_ACCOUNT_ID=${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" >> .env
- name: Build
run: uv run build.py
keepalive:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
permissions:
actions: write
steps:
# Ensure that the cron job keeps running (even if the repo is inactive).
- uses: liskin/gh-workflow-keepalive@v1