JobSpy/.github/workflows/job_scraper_dynamic.yml

49 lines
1.3 KiB
YAML

name: JobSpy Scraper Dynamic Workflow
on:
workflow_dispatch: # Allows manual trigger from GitHub or Power Automate
# Remove or comment out the schedule to prevent auto-runs
# schedule:
# - cron: '0 */6 * * *' # Runs every 6 hours (DISABLED)
permissions:
actions: read
contents: read
id-token: write
jobs:
scrape_jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run JobSpy Scraper
run: python job_scraper_dynamic.py
- name: Debug - Check if jobspy_output_dynamic.csv exists
run: |
if [ ! -f jobspy_output_dynamic.csv ]; then
echo "❌ ERROR: jobspy_output_dynamic.csv not found!"
exit 1
else
echo "✅ jobspy_output_dynamic.csv found, proceeding to upload..."
fi
- name: Upload JobSpy Output as Artifact
uses: actions/upload-artifact@v4 # Explicitly using latest version
with:
name: jobspy-results
path: jobspy_output_dynamic.csv