fixed yml file

pull/268/head
fakebranden 2025-03-07 21:26:09 +00:00
parent bb7d4c55ed
commit 9e41e6e9db
1 changed files with 18 additions and 8 deletions

View File

@ -1,10 +1,15 @@
name: JobSpy Scraper Workflow
on:
workflow_dispatch: # Manual trigger from GitHub or Power Automate
workflow_dispatch: # Allows manual trigger from GitHub or Power Automate
schedule:
- cron: '0 */6 * * *' # Runs every 6 hours
permissions:
actions: write
contents: read
id-token: write
jobs:
scrape_jobs:
runs-on: ubuntu-latest
@ -21,17 +26,22 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then
pip install -r requirements.txt
else
echo "⚠️ WARNING: requirements.txt not found! Skipping dependency installation."
fi
pip install -r requirements.txt
- name: Run JobSpy Scraper
run: python job_scraper.py
- name: Upload results to GitHub Artifacts
uses: actions/upload-artifact@v3
- name: Debug - Check if jobspy_output.csv exists
run: |
if [ ! -f jobspy_output.csv ]; then
echo "❌ ERROR: jobspy_output.csv not found!"
exit 1
else
echo "✅ jobspy_output.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.csv