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.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
chore: add nginx conf and deploy workflow (#3268)
Marko Kubrachenko45ec4152f9aa
diff --git a/.github/workflows/deploy-nginx.yml b/.github/workflows/deploy-nginx.ymlnew file mode 100644index 000000000..d4d9c61c3--- /dev/null+++ b/.github/workflows/deploy-nginx.yml@@ -0,0 +1,24 @@+# Triggers deployment of the Nginx reverse proxy configuration for crawlee.dev+# when the configuration file is updated in this repository.+name: Deploy Nginx Configuration++on:+ push:+ branches:+ - master+ paths:+ - 'website/nginx.conf'++jobs:+ trigger-deployment:+ name: Trigger Nginx deployment+ runs-on: ubuntu-latest+ steps:+ - name: Trigger deployment workflow in apify-docs-private+ run: |+ gh workflow run deploy-nginx.yml \+ --repo apify/apify-docs-private \+ --field deployment=crawlee-docs+ echo "✅ Deployment workflow triggered successfully"+ env:+ GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}diff --git a/website/nginx.conf b/website/nginx.confnew file mode 100644index 000000000..3ebe457f8--- /dev/null+++ b/website/nginx.conf@@ -0,0 +1,33 @@+# Nginx reverse proxy configuration for crawlee.dev+# Routes to GitHub Pages and handles legacy URL redirects+server {+ listen 0.0.0.0:8080;+ server_name 'crawlee.dev';+ location / {+ proxy_pass https://apify.github.io/crawlee/;+ }+ location /python {+ proxy_pass https://apify.github.io/crawlee-python/;+ }++ # So that we can have both GH pages and crawlee.dev/python working and loading assets from the same path+ location /crawlee-python {+ proxy_pass https://apify.github.io/crawlee-python/;+ }++ # Redirect rule for old JS docs to go under /js prefix+ rewrite ^/docs(.*)$ /js/docs$1 permanent;+ rewrite ^/api(.*)$ /js/api$1 permanent;++ # Remove version numbers from /js/api/3.[0-9]/* and /js/docs/3.[0-9]/*+ rewrite ^/js/api/3\.\d(/.*)?$ /js/api$1 permanent;+ rewrite ^/js/docs/3\.\d(/.*)?$ /js/docs$1 permanent;++ # Redirect rule for "upgrading-to-v03" to "upgrading-to-v0x"+ rewrite ^/python/docs/upgrading/upgrading-to-v03$ /python/docs/upgrading/upgrading-to-v0x permanent;++ # Redirect rule so that /python/docs actually leads somewhere+ rewrite ^/python/docs/?$ /python/docs/quick-start;++ rewrite ^/versions/?$ /js/api/core/changelog permanent;+}