Skip to content

Commit 6ec5e48

Browse files
Update build script to include staging mode in build process
1 parent 72cef46 commit 6ec5e48

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Install dependencies
5151
run: npm ci --legacy-peer-deps
5252
- name: Build
53-
run: PUBLIC_URL=${{ matrix.public_url }} VITE_DATA_FOLDER=${{ matrix.data_folder }} ./build.sh
53+
run: PUBLIC_URL=${{ matrix.public_url }} VITE_DATA_FOLDER=${{ matrix.data_folder }} MODE=staging ./build.sh
5454
- name: Upload
5555
uses: actions/upload-artifact@v4
5656
with:

build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ PUBLIC_URL=${PUBLIC_URL:-gallery}
44

55
VITE_DATA_FOLDER=${VITE_DATA_FOLDER:-data}
66

7+
MODE=${MODE:-production}
8+
79
echo "Making bundle with public_url=/$PUBLIC_URL and data=$VITE_DATA_FOLDER"
810

9-
PUBLIC_URL="$PUBLIC_URL" VITE_DATA_FOLDER="$VITE_DATA_FOLDER" npm run build -- --base=/${PUBLIC_URL} || exit 1;
11+
PUBLIC_URL="$PUBLIC_URL" VITE_DATA_FOLDER="$VITE_DATA_FOLDER" npm run build -- --base=/${PUBLIC_URL} --mode=${MODE} || exit 1;
1012

1113
zip -r $PUBLIC_URL.zip $PUBLIC_URL/* || exit 1;
1214

0 commit comments

Comments
 (0)