Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Scrape and Push to Private Repo #31

Scrape and Push to Private Repo

Scrape and Push to Private Repo #31

Workflow file for this run

name: Scrape and Push to Private Repo
on:
schedule:
- cron: "0 4 * * *" # Runs every day at 4 AM
workflow_dispatch: # Allows manual runs
jobs:
scrape-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout Private Repo
uses: actions/checkout@v2
with:
repository: "5ademni/job-scraper"
token: ${{ secrets.GH_PAT }} # A GitHub PAT that has access to your private repo
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run Scraper
run: python main.py
- name: Commit Scraped Data
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update scraped data"
- name: Push to Private Repo
run: git push