Fetch jobs #83
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: Fetch jobs | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # 7:00 AM MDT (UTC-6) — roughly Mar–Nov | |
| - cron: "0 13 * * *" | |
| # 7:00 AM MST (UTC-7) — roughly Nov–Mar | |
| - cron: "0 14 * * *" | |
| jobs: | |
| fetch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Run fetch | |
| run: | | |
| python ai-career/scripts/fetch_jobs.py | |
| - name: Run triage | |
| run: | | |
| python ai-career/scripts/triage_jobs.py | |
| - name: Run scoring | |
| run: | | |
| python ai-career/scripts/score_jobs.py | |
| - name: Commit outputs | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add \ | |
| ai-career/data/jobs.json \ | |
| ai-career/data/jobs.md \ | |
| ai-career/data/triage \ | |
| ai-career/data/jobs_today.json \ | |
| ai-career/data/jobs_today.md \ | |
| ai-career/data/jobs_backlog.json \ | |
| ai-career/data/jobs_backlog.md \ | |
| ai-career/data/state.json \ | |
| ai-career/data/archive \ | |
| ai-career/data/scored_jobs.json \ | |
| ai-career/data/scored_jobs.md || true | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit." | |
| exit 0 | |
| fi | |
| git commit -m "Update job feeds" | |
| git push |