mirror of https://github.com/Bunsly/JobSpy
updated yml from requirements.txt#
parent
58cc1937bb
commit
bb7d4c55ed
|
@ -1,15 +1,10 @@
|
||||||
name: JobSpy Scraper Workflow
|
name: JobSpy Scraper Workflow
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch: # Allows manual trigger from GitHub or Power Automate
|
workflow_dispatch: # Manual trigger from GitHub or Power Automate
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 */6 * * *' # Runs every 6 hours
|
- cron: '0 */6 * * *' # Runs every 6 hours
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
scrape_jobs:
|
scrape_jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -26,23 +21,17 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
if [ -f requirements.txt ]; then
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
else
|
||||||
|
echo "⚠️ WARNING: requirements.txt not found! Skipping dependency installation."
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Run JobSpy Scraper
|
- name: Run JobSpy Scraper
|
||||||
run: python job_scraper.py
|
run: python job_scraper.py
|
||||||
|
|
||||||
- name: Debug - Check if jobspy_output.csv exists
|
- name: Upload results to GitHub Artifacts
|
||||||
run: |
|
uses: actions/upload-artifact@v3
|
||||||
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:
|
with:
|
||||||
name: jobspy-results
|
name: jobspy-results
|
||||||
path: jobspy_output.csv
|
path: jobspy_output.csv
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue