Ingest Meeting Summaries #25
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: Ingest Meeting Summaries | |
| on: | |
| schedule: | |
| # Run daily at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: # Allow manual triggers from GitHub UI | |
| # Prevent concurrent runs to avoid race conditions and duplicate inserts | |
| concurrency: | |
| group: ingest-meetings | |
| cancel-in-progress: false # Wait for current run to finish instead of canceling | |
| jobs: | |
| ingest: | |
| runs-on: ubuntu-latest | |
| # Increased timeout to allow full ingestion of large datasets | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install -r requirements.txt | |
| pip install -e . || echo "Editable install failed, will use PYTHONPATH" | |
| - name: Verify Python can find src module | |
| run: | | |
| python -c "import sys; sys.path.insert(0, '.'); import src; print('✓ src module found')" || echo "⚠ src module not found in default path" | |
| - name: Verify configuration | |
| env: | |
| DATABASE_URL: ${{ secrets.SUPABASE_DATABASE_URL }} | |
| run: | | |
| if [ -z "$DATABASE_URL" ]; then | |
| echo "ERROR: SUPABASE_DATABASE_URL secret is not set" | |
| echo "Please configure it in: Settings → Secrets and variables → Actions" | |
| exit 1 | |
| fi | |
| echo "✓ DATABASE_URL is configured" | |
| echo "✓ Starting ingestion..." | |
| - name: Run ingestion | |
| env: | |
| DATABASE_URL: ${{ secrets.SUPABASE_DATABASE_URL }} | |
| LOG_FORMAT: json | |
| LOG_LEVEL: INFO | |
| shell: bash | |
| run: | | |
| set -o pipefail | |
| set -e | |
| # Set PYTHONPATH to include workspace directory | |
| export PYTHONPATH="${GITHUB_WORKSPACE}:${PYTHONPATH:-}" | |
| echo "PYTHONPATH=${PYTHONPATH}" | |
| echo "Current directory: $(pwd)" | |
| echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}" | |
| echo "" | |
| echo "Verifying src module can be imported:" | |
| python -c "import sys; print('sys.path:', sys.path[:3]); import src; print('✓ src imported'); import src.lib.config; print('✓ src.lib.config imported')" || (echo "❌ Import test failed" && exit 1) | |
| echo "" | |
| echo "Running ingestion..." | |
| python -m src.cli.ingest 2>&1 | tee ingestion.log | |
| - name: Upload logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ingestion-logs-${{ github.run_id }} | |
| path: ingestion.log | |
| retention-days: 30 | |
| if-no-files-found: warn | |