Skip to content

Commit f9ffcb9

Browse files
committed
refactor: Use runner.temp for temp dir management
1 parent 5f252e7 commit f9ffcb9

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/deploy-vitepress-docs.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ jobs:
4545
# Create isolated directory for documentation
4646
# So, that API.json will be build from the NPM packages,
4747
# and not from workspace packages
48-
mkdir -p /tmp/isolated-docs
49-
cp -r internal/documentation/. /tmp/isolated-docs/
48+
mkdir -p ${{ runner.temp }}/isolated-docs
49+
cp -r internal/documentation/. ${{ runner.temp }}/isolated-docs/
5050
- name: Install documentation dependencies from NPM
51-
working-directory: /tmp/isolated-docs
51+
working-directory: ${{ runner.temp }}/isolated-docs
5252
run: npm ci --engine-strict
5353
- name: Fetch gh-pages branch
5454
run: git fetch origin gh-pages --depth=1
5555
- name: generate CLI doc
56-
working-directory: /tmp/isolated-docs
56+
working-directory: ${{ runner.temp }}/isolated-docs
5757
run: npm run generate-cli-doc
5858
- name: Build vitepress build
59-
working-directory: /tmp/isolated-docs
59+
working-directory: ${{ runner.temp }}/isolated-docs
6060
run: |
6161
# The base output
6262
npm run build:vitepress -- --base="/${{ github.event.repository.name }}/${DOC_VERSION}/"
@@ -65,7 +65,7 @@ jobs:
6565
npm run build:vitepress -- --base="/${{ github.event.repository.name }}/${DOC_ALIAS}/" --outDir="dist-${DOC_ALIAS}"
6666
npm run build:assets -- ./dist-${DOC_ALIAS}
6767
- name: Build jsdoc
68-
working-directory: /tmp/isolated-docs
68+
working-directory: ${{ runner.temp }}/isolated-docs
6969
run: npm run jsdoc-generate
7070
# TODO: Skip for now deployment of the schema until we do a Schema Version 5 release
7171
# - name: Build Sch3 |
@@ -85,16 +85,16 @@ jobs:
8585
rm -rf ./gh-pages/${DOC_ALIAS}
8686
8787
# Main version route
88-
cp -R /tmp/isolated-docs/dist ./gh-pages/${DOC_VERSION}/
88+
cp -R ${{ runner.temp }}/isolated-docs/dist ./gh-pages/${DOC_VERSION}/
8989
9090
# Alias route. E.g., next, latest, stable, etc.
9191
# For vitepress must be a copy with different config, not a symlink
92-
cp -R /tmp/isolated-docs/dist-${DOC_ALIAS} ./gh-pages/${DOC_ALIAS}/
92+
cp -R ${{ runner.temp }}/isolated-docs/dist-${DOC_ALIAS} ./gh-pages/${DOC_ALIAS}/
9393
# Symlink the api docs to avoid duplication
9494
ln -s ../${DOC_VERSION}/api ./gh-pages/${DOC_ALIAS}/api
9595
9696
# TODO: Enable when v5 release is done
97-
# cp /tmp/isolated-docs/scripts/resources/custom404.html ./gh-pages/404.html
97+
# cp ${{ runner.temp }}/isolated-docs/scripts/resources/custom404.html ./gh-pages/404.html
9898
- name: Publish Docs
9999
run: |
100100
cd ./gh-pages

0 commit comments

Comments
 (0)