mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-30 13:10:56 +00:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Hubspot Sync
|
||
|
||
on:
|
||
schedule:
|
||
# Every 15 minutes, 07:00–18:59, Monday–Friday (UTC)
|
||
- cron: '*/15 7-18 * * 1-5'
|
||
|
||
# Once on Saturday at 09:00 UTC
|
||
- cron: '0 9 * * 6'
|
||
|
||
# Once on Sunday at 09:00 UTC
|
||
- cron: '0 9 * * 0'
|
||
workflow_dispatch:
|
||
|
||
jobs:
|
||
hubspot-sync:
|
||
runs-on: [self-hosted, mist]
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- name: Set up Python
|
||
uses: actions/setup-python@v5
|
||
with:
|
||
python-version: '3.12'
|
||
|
||
- name: Install dependencies
|
||
run: |
|
||
pip install poetry
|
||
poetry install --no-root
|
||
|
||
# - name: Run scripts
|
||
# env:
|
||
# PYTHONPATH: ${{ github.workspace }}
|
||
# DATABASE_URL: ${{ secrets.PROD_DATABASE_URL }}
|
||
# run: |
|
||
# pwd
|
||
# ls -la
|
||
# poetry run python etl/hubSpotClient/scripts/hubspot_gather_all_deals.py
|
||
|
||
|
||
- name: Run scripts
|
||
env:
|
||
PYTHONPATH: ${{ github.workspace }}
|
||
DATABASE_URL: ${{ secrets.PROD_DATABASE_URL }}
|
||
run: |
|
||
pwd
|
||
ls -la
|
||
poetry run python etl/hubSpotClient/scripts/hubspot_update_script.py
|
||
|
||
|
||
|