diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c9512f5..4521bec 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -68,6 +68,21 @@ jobs: run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT - name: gzip build for LittleFS run: find dist -type f ! -name ".*" -exec sh -c 'mkdir -p "build_gz/$(dirname "${1#dist/}")" && gzip -k "$1" -c > "build_gz/${1#dist/}".gz' _ {} \; + - name: Check GZipped directory size + run: | + # Set the threshold size in bytes + THRESHOLD=409600 + + # Calculate the total size of files in the directory + DIRECTORY_SIZE=$(du -b -s build_gz | awk '{print $1}') + + # Fail the workflow if the size exceeds the threshold + if [ "$DIRECTORY_SIZE" -gt "$THRESHOLD" ]; then + echo "Directory size exceeds the threshold of $THRESHOLD bytes" + exit 1 + else + echo "Directory size is within the threshold" + fi - name: Create tarball run: tar czf webui.tgz --strip-components=1 dist - name: Build LittleFS diff --git a/src/routes/Control.ts b/src/routes/Control.ts deleted file mode 100644 index e69de29..0000000 diff --git a/yarn.lock b/yarn.lock index e0f66bc..232417d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3240,6 +3240,17 @@ svelte-preprocess@^5.1.0: sorcery "^0.11.0" strip-indent "^3.0.0" +svelte-preprocess@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/svelte-preprocess/-/svelte-preprocess-5.1.1.tgz#53d7107c2e8b307afd4418e06239177c4de12025" + integrity sha512-p/Dp4hmrBW5mrCCq29lEMFpIJT2FZsRlouxEc5qpbOmXRbaFs7clLs8oKPwD3xCFyZfv1bIhvOzpQkhMEVQdMw== + dependencies: + "@types/pug" "^2.0.6" + detect-indent "^6.1.0" + magic-string "^0.27.0" + sorcery "^0.11.0" + strip-indent "^3.0.0" + svelte@^4.0.5: version "4.2.3" resolved "https://registry.yarnpkg.com/svelte/-/svelte-4.2.3.tgz#4e77f7d528a543a0d516af00bc9b3131f01a2721"