Skip to content

Commit bf5b6c1

Browse files
Copilottyeth
andcommitted
Address code review feedback - use npm scripts and runner.temp
Co-authored-by: tyeth <6692083+tyeth@users.noreply.github.com>
1 parent 2dbb6c7 commit bf5b6c1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/deploy-preview.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ jobs:
8383
# Clean and generate docs first
8484
npm run clean
8585
npm run genDocs
86-
# Build with the dynamic base href
87-
cross-env PARCEL_WORKERS=0 npx parcel build src/index.html --no-optimize --public-url "${{ steps.deployment-path.outputs.base_href }}"
86+
# Build with the dynamic base href using custom script
87+
npm run parcel:build:custom -- --public-url "${{ steps.deployment-path.outputs.base_href }}"
8888
8989
- name: Checkout gh-pages branch
9090
id: checkout-gh-pages
@@ -102,8 +102,9 @@ jobs:
102102
if: steps.checkout-gh-pages.outputs.exists == 'false'
103103
run: |
104104
# Create a temporary directory for gh-pages initialization
105-
mkdir -p /tmp/gh-pages-init
106-
cd /tmp/gh-pages-init
105+
TEMP_DIR="${{ runner.temp }}/gh-pages-init"
106+
mkdir -p "$TEMP_DIR"
107+
cd "$TEMP_DIR"
107108
git init
108109
git checkout -b gh-pages
109110
echo "# GitHub Pages - Preview Deployments" > README.md

0 commit comments

Comments
 (0)