@@ -40,18 +40,21 @@ jobs:
4040 cache : npm
4141 - name : Setup Pages
4242 uses : actions/configure-pages@v4
43- - name : Install dependencies
44- run : npm ci --engine-strict # --engine-strict is used to fail-fast if deps require node versions unsupported by the repo
45- - name : Install documentation dependencies
46- working-directory : internal/documentation
47- run : npm ci --engine-strict # --engine-strict is used to fail-fast if deps require node versions unsupported by the repo
43+ - name : Copy documentation package to isolated directory
44+ run : |
45+ # Create isolated directory for documentation
46+ mkdir -p /tmp/isolated-docs
47+ cp -r internal/documentation/. /tmp/isolated-docs/
48+ - name : Install documentation dependencies from NPM
49+ working-directory : /tmp/isolated-docs
50+ run : npm ci --engine-strict
4851 - name : Fetch gh-pages branch
4952 run : git fetch origin gh-pages --depth=1
5053 - name : generate CLI doc
51- working-directory : internal/documentation
54+ working-directory : /tmp/isolated-docs
5255 run : npm run generate-cli-doc
5356 - name : Build vitepress build
54- working-directory : internal/documentation
57+ working-directory : /tmp/isolated-docs
5558 run : |
5659 # The base output
5760 npm run build:vitepress -- --base="/${{ github.event.repository.name }}/${DOC_VERSION}/"
@@ -60,11 +63,10 @@ jobs:
6063 npm run build:vitepress -- --base="/${{ github.event.repository.name }}/${DOC_ALIAS}/" --outDir="dist-${DOC_ALIAS}"
6164 npm run build:assets -- ./dist-${DOC_ALIAS}
6265 - name : Build jsdoc
63- working-directory : internal/documentation
66+ working-directory : /tmp/isolated-docs
6467 run : npm run jsdoc-generate
6568 # TODO: Skip for now deployment of the schema until we do a Schema Version 5 release
66- # - name: Build Schema
67- # run: |
69+ # - name: Build Sch3 |
6870 # npm run schema-generate
6971 # npm run schema-workspace-generate
7072 - name : Checkout gh-pages
@@ -81,16 +83,16 @@ jobs:
8183 rm -rf ./gh-pages/${DOC_ALIAS}
8284
8385 # Main version route
84- cp -R ./internal/documentation /dist ./gh-pages/${DOC_VERSION}/
86+ cp -R /tmp/isolated-docs /dist ./gh-pages/${DOC_VERSION}/
8587
8688 # Alias route. E.g., next, latest, stable, etc.
8789 # For vitepress must be a copy with different config, not a symlink
88- cp -R ./internal/documentation /dist-${DOC_ALIAS} ./gh-pages/${DOC_ALIAS}/
90+ cp -R /tmp/isolated-docs /dist-${DOC_ALIAS} ./gh-pages/${DOC_ALIAS}/
8991 # Symlink the api docs to avoid duplication
9092 ln -s ../${DOC_VERSION}/api ./gh-pages/${DOC_ALIAS}/api
9193
9294 # TODO: Enable when v5 release is done
93- # cp ./internal/documentation /scripts/resources/custom404.html ./gh-pages/404.html
95+ # cp /tmp/isolated-docs /scripts/resources/custom404.html ./gh-pages/404.html
9496 - name : Publish Docs
9597 run : |
9698 cd ./gh-pages
0 commit comments