From d47ff619e1f10b5d1e37e46d0a24b83353176632 Mon Sep 17 00:00:00 2001 From: Artsiom Trubchyk Date: Tue, 19 Dec 2023 16:51:27 +0300 Subject: [PATCH] Update CI to build 3 demos for gh-pages * Update CI * Show directory structure in the end of the CI build * Fix CI * Update CI --- .github/workflows/main.yml | 14 ++++++++++---- dev_build_web.sh | 6 ++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 90a7912..b453c0d 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,10 +40,16 @@ jobs: git reset --hard git fetch origin alt-version git switch alt-version - rm -rf build/default - java -jar bob.jar --email a@b.com --auth 123 --texture-compression true --bundle-output build/bundle/js-web --build-report-html build/bundle/public/build_report_alt-version.html --platform js-web --archive --liveupdate yes --variant debug resolve build bundle - mv build/liveupdate_output/*.zip build/bundle/js-web/liveupdate_reszip_demo/resources.zip - mv build/bundle/js-web/liveupdate_reszip_demo public/old-version + rm -rf build + mkdir -p build/bundle + PLATFORM=wasm-web + BUNDLE_DIR=old-version + java -jar bob.jar --email f@b.com --auth 123 --texture-compression true --bundle-output build/bundle/${PLATFORM} --build-report-html "build/bundle/build_report_${BUNDLE_DIR}.html" --platform ${PLATFORM} --architectures ${PLATFORM} --archive --liveupdate yes --variant debug resolve build bundle + mv build/liveupdate_output/*.zip "build/bundle/${PLATFORM}/liveupdate_reszip_demo/${RESOURCES_ZIP}" + mv build/bundle/*.html "public/" + mv "build/bundle/${PLATFORM}/liveupdate_reszip_demo" "public/${BUNDLE_DIR}" + + find "public/" | sort -z - name: Deploy to Pages 🚀 uses: JamesIves/github-pages-deploy-action@v4 diff --git a/dev_build_web.sh b/dev_build_web.sh index 55c1181..7b0150b 100644 --- a/dev_build_web.sh +++ b/dev_build_web.sh @@ -20,9 +20,10 @@ sed -i 's/"enabled", true/"enabled", false/' example/level2/set_alt_text.script rm -rf build mkdir -p build/bundle -java -jar bob.jar --email f@b.com --auth 123 --texture-compression true --settings "${RESZIP_INI}" --bundle-output build/bundle/${PLATFORM} --build-report-html build/bundle/build_report_latest.html --platform ${PLATFORM} --architectures ${PLATFORM} --archive --liveupdate yes --variant debug resolve build bundle +java -jar bob.jar --email f@b.com --auth 123 --texture-compression true --settings "${RESZIP_INI}" --bundle-output build/bundle/${PLATFORM} --build-report-html "build/bundle/build_report_${BUNDLE_DIR}.html" --platform ${PLATFORM} --architectures ${PLATFORM} --archive --liveupdate yes --variant debug resolve build bundle mv build/liveupdate_output/*.zip "build/bundle/${PLATFORM}/liveupdate_reszip_demo/${RESOURCES_ZIP}" rm -f "${RESZIP_INI}" +mv build/bundle/*.html "public/" mv "build/bundle/${PLATFORM}/liveupdate_reszip_demo" "public/${BUNDLE_DIR}" # BUNDLE 2 @@ -34,9 +35,10 @@ sed -i 's/"enabled", false/"enabled", true/' example/level2/set_alt_text.script rm -rf build mkdir -p build/bundle -java -jar bob.jar --email f@b.com --auth 123 --texture-compression true --settings "${RESZIP_INI}" --bundle-output build/bundle/${PLATFORM} --build-report-html build/bundle/build_report_latest.html --platform ${PLATFORM} --architectures ${PLATFORM} --archive --liveupdate yes --variant debug resolve build bundle +java -jar bob.jar --email f@b.com --auth 123 --texture-compression true --settings "${RESZIP_INI}" --bundle-output build/bundle/${PLATFORM} --build-report-html "build/bundle/build_report_${BUNDLE_DIR}.html" --platform ${PLATFORM} --architectures ${PLATFORM} --archive --liveupdate yes --variant debug resolve build bundle mv build/liveupdate_output/*.zip "build/bundle/${PLATFORM}/liveupdate_reszip_demo/${RESOURCES_ZIP}" rm -f "${RESZIP_INI}" +mv build/bundle/*.html "public/" mv "build/bundle/${PLATFORM}/liveupdate_reszip_demo" "public/${BUNDLE_DIR}" # DONE