LinkedInWebScraper

Release and Automation

This repository ships four GitHub Actions workflows that cover validation, docs publishing, package publishing, and the scheduled daily scrape.

Workflow Inventory

One-Time GitHub Setup

GitHub Pages

Trusted Publishing

Recommended release posture:

Scheduled Runtime

Repository Permissions

CI Flow

ci.yml is the push/PR gate.

It runs:

This keeps the local tox contract and the GitHub CI contract identical.

Docs Publish Flow

docs.yml performs two jobs:

  1. install the docs build dependencies and run python -m mkdocs build --strict
  2. upload the site/ artifact and deploy it with the GitHub Pages deployment actions

The workflow is intentionally limited to main pushes and manual dispatch so preview behavior stays on the normal PR checks instead of publishing every branch.

Release Flow

release.yml now supports two release paths:

The automated release job sequence is:

  1. confirm the current commit is on main and both CI and Docs succeeded for the same SHA
  2. read the version from pyproject.toml and compare it with the latest published release
  3. skip if the version is not newer or the tag already exists
  4. build the sdist and wheel through tox -e build
  5. create the GitHub Release object and upload the built wheel and sdist
  6. publish the same built artifacts to PyPI with trusted publishing

Manual dispatch uses the same artifact flow, but it still respects the version gate so duplicate releases are skipped.

Rollback

PyPI does not allow overwriting a released version.

Rollback guidance:

Daily Automation

daily-scrape.yml runs at 30 12 * * *, which is 12:30 UTC every day.

The workflow sequence is:

  1. install the package with the optional OpenAI extra available
  2. attach a data branch worktree
  3. restore the previous SQLite state from the data-latest release asset; a run refuses to start fresh unless it positively confirms the asset is absent and was dispatched with allow_fresh_state=true (first-run bootstrap only)
  4. initialize the SQLite schema before the scrape
  5. run a CLI dry run for visibility
  6. run linkedin-webscraper scrape daily --config .github/runtime/daily.toml
  7. upload artifacts/state/linkedin_jobs.sqlite back to the data-latest release with --clobber
  8. copy current CSV exports to both data/exports/latest and data/exports/YYYY-MM-DD
  9. commit and push the export data back to data
  10. upload workflow artifacts and summarize the run

Failure Handling

The workflow includes:

Operating Notes