File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 uses : actions/upload-artifact@v4
2727 with :
2828 name : public-dir
29- path : ./ public-dir.zip
29+ path : public-dir.zip
3030 retention-days : 1
3131 - name : Trigger Inner workflow
3232 run : echo "triggering inner workflow"
Original file line number Diff line number Diff line change 88
99jobs :
1010 deploy-preview :
11- if : github.repository == 'meshery-extensions/shape-builder'
11+ if : >
12+ github.repository == 'meshery-extensions/shape-builder' &&
13+ github.event.workflow_run.conclusion == 'success'
1214 runs-on : ubuntu-24.04
1315 steps :
1416 - name : Checkout code
2426
2527 - name : Unzip Site
2628 run : |
27- rm -rf ./docs/_site
28- unzip public-dir.zip
29+ rm -rf docs/_site
30+ mkdir -p docs/_site
31+ unzip public-dir.zip -d docs/_site
2932 rm -f public-dir.zip
3033
3134 - name : Deploy to Netlify
Original file line number Diff line number Diff line change 1- #! /usr/bin/env bash
1+ #! /usr/bin/env bash
2+ set -e
23
3- if [ -f public-dir.zip ]; then
4- rm -rf public-dir.zip
4+ ZIP_NAME=" public-dir.zip"
5+ BUILD_DIR=" site/public"
6+
7+ # Ensure build output exists and is not empty
8+ if [ ! -d " $BUILD_DIR " ] || [ -z " $( ls -A " $BUILD_DIR " ) " ]; then
9+ echo " Build output missing or empty at $BUILD_DIR "
10+ exit 1
511fi
6- mkdir -p public
7- zip -r public-dir.zip . -i ./public
12+
13+ rm -f " $ZIP_NAME "
14+
15+ # Zip ONLY the contents of the built site
16+ (
17+ cd " $BUILD_DIR "
18+ zip -r " ../../$ZIP_NAME " .
19+ )
20+
21+ echo " Zipped site contents into $ZIP_NAME "
You can’t perform that action at this time.
0 commit comments