Skip to content

Commit 16529fc

Browse files
authored
chore: add install step in docs workflow (aws-powertools#1183)
* fix: add build on cache miss * chore: excluded unreleased utils from api docs
1 parent 34ef180 commit 16529fc

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/reusable-publish-docs.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,16 @@ jobs:
4848
with:
4949
path: "./node_modules"
5050
key: 16-cache-utils-node-modules-${{ hashFiles('./package-lock.json') }}
51-
# Here we assume that there will always be a cache hit because this workflow can be triggered
52-
# only after tests have already happened on this same code
51+
- name: Install dependencies
52+
# We can skip the installation if there was a cache hit
53+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
54+
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
55+
run: npm ci --foreground-scripts
5356
- name: Build packages
57+
# If there's a cache hit we still need to manually build the packages
58+
# this would otherwise have been done automatically as a part of the
59+
# post-install npm hook
60+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
5461
run: |
5562
npm run build -w packages/commons
5663
npm run build -w packages/logger & npm run build -w packages/tracer & npm run build -w packages/metrics

packages/idempotency/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"license": "MIT",
3131
"main": "./lib/index.js",
3232
"types": "./lib/index.d.ts",
33-
"typedocMain": "src/index.ts",
33+
"typedocMain": "src/file_that_does_not_exist_so_its_ignored_from_api_docs.ts",
3434
"files": [
3535
"lib"
3636
],

packages/parameters/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"license": "MIT-0",
3131
"main": "./lib/index.js",
3232
"types": "./lib/index.d.ts",
33+
"typedocMain": "src/file_that_does_not_exist_so_its_ignored_from_api_docs.ts",
3334
"files": [
3435
"lib"
3536
],
@@ -52,4 +53,4 @@
5253
"serverless",
5354
"nodejs"
5455
]
55-
}
56+
}

0 commit comments

Comments
 (0)