insight/.github/workflows/gather_hubspot_data.yml
2025-11-24 17:52:50 +00:00

34 lines
913 B
YAML

name: Hubspot Data to S3
on:
schedule:
- cron: '0 5 * * *' # Every day at 05:00 UTC
workflow_dispatch:
jobs:
gather_hubspot_data_and_upload_to_s3:
runs-on: [self-hosted, mist]
timeout-minutes: 120 # <-- 2 hour timeout
steps:
- uses: actions/checkout@v4
# Build Docker image using .devcontainer/Dockerfile
- name: Build Docker image
run: |
docker build -f .devcontainer/Dockerfile -t latest-image .
# Install dependencies + run script inside container
- name: Poetry install & run script
run: |
docker run \
-u $(id -u):$(id -g) \
-v ${{ github.workspace }}:/workspaces/insight \
-w /workspaces/insight/backend \
latest-image \
bash -c "
poetry install &&
poetry run python src/dashboard/scripts/hubspot_to_s3.py
"