Add missing files and workflow

This commit is contained in:
Djuri Baars 2023-11-21 20:44:00 +01:00
parent 70bbc99ca1
commit c5ee4bfd06
3 changed files with 26 additions and 0 deletions

View file

@ -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

View file

View file

@ -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"