Skip to content

Commit 9ff68fc

Browse files
committed
fix: improve docs workflow reliability for GitHub Pages
- Remove dependency on potentially missing build artifacts cache - Always run build to ensure latest packages are built - Add restore-keys for build artifacts cache as fallback - Add comprehensive debug output for docs build - Ensure docs/out directory exists before upload
1 parent 1c9f476 commit 9ff68fc

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/docs.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
with:
3939
path: packages/*/dist
4040
key: build-artifacts-${{ github.sha }}
41+
restore-keys: |
42+
build-artifacts-
4143
4244
- id: cache-node-modules
4345
uses: actions/cache@v4
@@ -62,8 +64,9 @@ jobs:
6264
# This ensures workspace packages like docs have their dependencies
6365
- run: pnpm install --frozen-lockfile
6466

67+
# Always build packages to ensure we have the latest changes
68+
# Don't rely solely on cache as it might be stale or missing
6569
- run: pnpm turbo run build
66-
if: steps.cached-build-artifacts.outputs.cache-hit != 'true'
6770

6871
- run: pnpm turbo run docgen --filter=@evolution-sdk/evolution
6972

@@ -81,7 +84,17 @@ jobs:
8184
# Add debug step to check if the output directory exists
8285
- name: Debug output directory
8386
run: |
87+
echo "Checking docs build output:"
8488
ls -la docs/
89+
if [ -d "docs/out" ]; then
90+
echo "docs/out directory exists:"
91+
ls -la docs/out/
92+
echo "Total files in docs/out:"
93+
find docs/out -type f | wc -l
94+
else
95+
echo "ERROR: docs/out directory does not exist!"
96+
exit 1
97+
fi
8598
8699
- uses: actions/upload-pages-artifact@v3
87100
with:

0 commit comments

Comments
 (0)