Skip to content

Refactor database.py to simplify table creation and property insertio… #32

Refactor database.py to simplify table creation and property insertio…

Refactor database.py to simplify table creation and property insertio… #32

Workflow file for this run

name: Run Python Project with UV
on:
push:
branches:
- main
schedule:
- cron: '0 */3 * * *'
jobs:
run-python:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install UV
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Set up Python Environment with UV
run: uv venv .venv
- name: Install Dependencies
run: |
cd real-estate-etl
uv lock
- name: Create .env File
run: |
echo "warehouse_name=${{ secrets.warehouse_name }}" > .env
echo "motherduck_token=${{ secrets.motherduck_token }}" >> .env
echo "scrape_url=${{ secrets.scrape_url }}" >> .env
echo "telegram_bot_api_key=${{ secrets.telegram_bot_api_key }}" >> .env
echo "chat_id=${{ secrets.chat_id }}" >> .env
echo "chat_tag=${{ secrets.chat_tag }}" >> .env
- name: Run Python Script
env:
warehouse_name: ${{ secrets.warehouse_name }}
motherduck_token: ${{ secrets.motherduck_token }}
scrape_url: ${{ secrets.scrape_url }}
telegram_bot_api_key: ${{ secrets.telegram_bot_api_key }}
chat_id: ${{ secrets.chat_id }}
chat_tag: ${{ secrets.chat_tag }}
run: |
cd real-estate-etl
uv run scan_properties.py