Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

docs: fix automatic documentation versioning on `minor|major` releases (#3065)

Jindřich Bär804ee59d4b63
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 247224b93..403b41d01 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -212,8 +212,14 @@ jobs:
- name: Snapshot the current version
run: |
cd website
- yarn docusaurus docs:version $(jq .version ../lerna.json | sed s/\"//g | head -c 3)
- yarn docusaurus api:version $(jq .version ../lerna.json | sed s/\"//g | head -c 3)
+ VERSION=$(jq -r '.version' ../lerna.json)
+ if [ -z "$VERSION" ]; then
+ echo "Error: VERSION is empty. Ensure lerna.json exists and contains a valid .version field."
+ exit 1
+ fi
+ MAJOR_MINOR=$(echo $VERSION | cut -d. -f1,2)
+ yarn docusaurus docs:version $MAJOR_MINOR
+ yarn docusaurus api:version $MAJOR_MINOR
- name: Commit and push the version snapshot
run: |