Skip to content

Commit 84c9c1c

Browse files
committed
docs: Migrate from npm to yarn and relax web dependencies
1 parent 07a547a commit 84c9c1c

File tree

7 files changed

+18178
-27175
lines changed

7 files changed

+18178
-27175
lines changed

.github/workflows/_check_code.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Checkout repository
2525
uses: actions/checkout@v6
2626
- name: Check spelling with typos
27-
uses: crate-ci/typos@v1.42.1
27+
uses: crate-ci/typos@v1
2828

2929
lint_check:
3030
name: Lint check

.github/workflows/_release_docs.yaml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,6 @@ jobs:
3838
uses: actions/setup-node@v6
3939
with:
4040
node-version: ${{ env.NODE_VERSION }}
41-
cache: npm
42-
cache-dependency-path: website/package-lock.json
43-
44-
- name: Install Node dependencies
45-
run: |
46-
npm install
47-
npm update @apify/docs-theme
48-
working-directory: ./website
49-
50-
# We do this as early as possible to prevent conflicts if someone else would push something in the meantime
51-
- name: Commit the updated package.json and lockfile
52-
run: |
53-
git config user.name 'GitHub Actions'
54-
git config user.email 'github-actions[bot]@users.noreply.github.com'
55-
git add website/package.json
56-
git add website/package-lock.json
57-
git diff-index --quiet HEAD || git commit -m 'chore: Automatic docs theme update [skip ci]' || true
58-
git push
5941

6042
- name: Set up Python
6143
uses: actions/setup-python@v6
@@ -70,6 +52,18 @@ jobs:
7052
- name: Install Python dependencies
7153
run: uv run poe install-dev
7254

55+
- name: Update docs theme
56+
run: uv run poe update-docs-theme
57+
58+
- name: Commit the updated package.json and lockfile
59+
run: |
60+
git config user.name 'GitHub Actions'
61+
git config user.email 'github-actions[bot]@users.noreply.github.com'
62+
git add website/package.json
63+
git add website/yarn.lock
64+
git diff-index --quiet HEAD || git commit -m 'chore: Automatic docs theme update [skip ci]' || true
65+
git push
66+
7367
- name: Build docs
7468
run: uv run poe build-docs
7569
env:

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,14 @@ shell = "uv run ruff format --check && uv run ruff check"
240240
[tool.poe.tasks.format]
241241
shell = "uv run ruff check --fix && uv run ruff format"
242242

243+
[tool.poe.tasks.update-docs-theme]
244+
shell = "corepack enable && yarn up @apify/docs-theme"
245+
cwd = "website"
246+
243247
[tool.poe.tasks.build-docs]
244-
shell = "./build_api_reference.sh && npm ci && npm run build"
248+
shell = "./build_api_reference.sh && corepack enable && yarn && uv run yarn build"
245249
cwd = "website"
246250

247251
[tool.poe.tasks.run-docs]
248-
shell = "./build_api_reference.sh && npm ci && npm run start"
252+
shell = "./build_api_reference.sh && corepack enable && yarn && uv run yarn start"
249253
cwd = "website"

website/.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nodeLinker: node-modules
2+
enableGlobalCache: true

0 commit comments

Comments
 (0)