Build and Push Docker Image #40
This file contains hidden or 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: 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 |