Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/actions/pnpm-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "pnpm install"
description: "Run pnpm install with cache enabled"
inputs:
working-directory:
description: "Directory to run pnpm install in"
required: false
default: "."
runs:
using: "composite"
steps:
- name: Set up swap space
if: runner.os == 'Linux'
uses: pierotofy/set-swap-space@v1.0
with:
swap-size-gb: 10

- uses: pnpm/action-setup@v4.1.0
name: Install pnpm
with:
run_install: false

- name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
id: pnpm-config
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache rotation keys
id: cache-rotation
shell: bash
run: |
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-

- name: Install dependencies
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
pnpm install --frozen-lockfile --prefer-offline --loglevel error
env:
HUSKY: "0"
2 changes: 1 addition & 1 deletion .github/workflows/_release_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
git config user.name 'GitHub Actions'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add website/package.json
git add website/yarn.lock
git add website/pnpm-lock.yaml
git diff-index --quiet HEAD || git commit -m 'chore: Automatic docs theme update [skip ci]' || true
git push

Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/manual_release_stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,9 @@ jobs:
run: uv run poe install-dev

- name: Install website dependencies
run: |
cd website
corepack enable
yarn install
uses: ./.github/actions/pnpm-install
with:
working-directory: website

- name: Snapshot the current version
run: |
Expand All @@ -157,8 +156,8 @@ jobs:
jq 'map(select(. != env.MAJOR_MINOR))' versions.json > tmp.json && mv tmp.json versions.json
# Build API reference and create version snapshots
bash build_api_reference.sh
npx docusaurus docs:version "$MAJOR_MINOR"
npx docusaurus api:version "$MAJOR_MINOR"
pnpm exec docusaurus docs:version "$MAJOR_MINOR"
pnpm exec docusaurus api:version "$MAJOR_MINOR"

- name: Commit and push versioned docs
id: commit_versioned_docs
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ docs/changelog.md
# Website build artifacts, node dependencies
website/build
website/node_modules
website/.yarn
website/.pnpm-store
website/.docusaurus
website/api-typedoc-generated.json
website/apify-shared-docspec-dump.jsonl
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ shell = "uv run ruff format --check && uv run ruff check"
shell = "uv run ruff check --fix && uv run ruff format"

[tool.poe.tasks.update-docs-theme]
shell = "corepack enable && yarn up @apify/docs-theme"
shell = "pnpm update @apify/docs-theme"
cwd = "website"

[tool.poe.tasks.build-docs]
shell = "./build_api_reference.sh && corepack enable && yarn && uv run yarn build"
shell = "./build_api_reference.sh && pnpm install && uv run pnpm build"
cwd = "website"

[tool.poe.tasks.run-docs]
shell = "./build_api_reference.sh && corepack enable && yarn && uv run yarn start"
shell = "./build_api_reference.sh && pnpm install && uv run pnpm start"
cwd = "website"
5 changes: 5 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@
"groupSlug": "dev-dependencies",
"automerge": true,
"automergeType": "branch"
},
{
"matchPackageNames": ["@apify/*", "@crawlee/*"],
"minimumReleaseAge": "0 days"
}
],
"minimumReleaseAge": "1 day",
"internalChecksFilter": "strict",
"schedule": ["before 7am every weekday"],
"ignoreDeps": ["apify", "docusaurus-plugin-typedoc-api"]
}
4 changes: 4 additions & 0 deletions website/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node-linker=hoisted
link-workspace-packages=true
prefer-workspace-packages=true
public-hoist-pattern[]=*
2 changes: 0 additions & 2 deletions website/.yarnrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
scripts: ['/js/custom.js', ...(config.scripts ?? [])],
githubHost: 'github.com',
future: {
experimental_faster: {
faster: {
// ssgWorkerThreads: true,
swcJsLoader: true,
swcJsMinimizer: true,
Expand Down
15 changes: 8 additions & 7 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "apify-sdk-python",
"name": "apify-sdk-python-website",
"private": true,
"scripts": {
"clean": "rimraf .docusaurus build",
"build": "yarn clean && docusaurus build",
"start": "yarn clean && docusaurus start",
"deploy": "yarn clean && docusaurus deploy",
"build": "pnpm clean && docusaurus build",
"start": "pnpm clean && docusaurus start",
"deploy": "pnpm clean && docusaurus deploy",
"docusaurus": "docusaurus",
"publish-gh-pages": "docusaurus-publish",
"rename-version": "docusaurus rename-version",
"swizzle": "docusaurus swizzle",
"version": "docusaurus version",
"write-translations": "docusaurus write-translations",
"prettify": "prettier --write --config ./tools/docs-prettier.config.js ../docs/*.md ../docs/*.mdx",
"lint": "yarn lint:code",
"lint:fix": "yarn lint:code:fix",
"lint": "pnpm lint:code",
"lint:fix": "pnpm lint:code:fix",
"lint:code": "eslint .",
"lint:code:fix": "eslint . --fix"
},
Expand Down Expand Up @@ -47,5 +48,5 @@
"rimraf": "^6.0.0",
"typescript": "^6.0.0"
},
"packageManager": "yarn@4.13.0"
"packageManager": "pnpm@10.24.0"
}
Loading
Loading