Speeds up the upload process

This commit is contained in:
Daniel Vu
2023-10-01 23:21:22 -04:00
parent 8847e52441
commit d19f5400a4
4 changed files with 4 additions and 34 deletions
+2 -17
View File
@@ -53,17 +53,9 @@ jobs:
# run any `bun` or `bunx` command
- run: bun install
working-directory: contrib/sheet-pixie
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: install
args: fd-find
- run: make clean
- run: bun run contrib/sheet-pixie/index.ts ${{ needs.changes.outputs.sheet-json }}
- run: bash update.sh ${{ runner.temp }}
- run: bash sync_sheets.sh
- run: gcloud storage rsync --project=roll20-actual ${{ runner.temp }} "gs://roll20-cdn/$CDN_SHEETS_FOLDER" --cache-control='no-cache'
force-update:
name: Process HTML/CSS for all character sheets (force-update)
@@ -90,13 +82,6 @@ jobs:
# run any `bun` or `bunx` command
- run: bun install
working-directory: contrib/sheet-pixie
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: install
args: fd-find
- run: make clean
- run: make all
- run: bash force-update.sh "$RUNNER_TEMP"
- run: bash force-update.sh ${{ runner.temp }}
+2 -2
View File
@@ -7,7 +7,7 @@ config:
fd . --exclude contrib --type d --max-depth 1 --exec cp $(DEFAULT_RELEASE_SCRIPT) {} \; || true
clean:
rm -rf **/*/dist
rm -rf **/dist
all:
fd . --strip-cwd-prefix --exclude contrib --exclude "Zelda BOTW" --type d --max-depth 1 --exec bun run contrib/sheet-pixie/index.ts "{}/sheet.json" \;
find * -mindepth 1 -maxdepth 1 -not -path 'Zelda BOTW/sheet.json' -type f -name "sheet.json" -print0 | parallel -0 bun run contrib/sheet-pixie/index.ts {}
-5
View File
@@ -1,5 +0,0 @@
#!/bin/bash
# You need GCloud Access to the dropbox to run this script
gcloud storage rsync --project=roll20-actual "$1/dist" "$3" --delete-unmatched-destination-objects --cache-control='no-cache'
gcloud storage rsync --project=roll20-actual "$1/translations" "$4" --delete-unmatched-destination-objects --cache-control='no-cache' || true
-10
View File
@@ -1,10 +0,0 @@
#!/bin/bash
rm -rf sync_sheets.sh
touch sync_sheets.sh
echo '#!/bin/bash' > sync_sheets.sh
echo 'set -e' >> sync_sheets.sh
chmod +x sync_sheets.sh
CWD=$(pwd)
cd $1;
fd dist --type d --strip-cwd-prefix -j1 --exec bash -c 'echo ./gcp.sh \"$(pwd)/$(printf "%s" "{//}")\" \"$(printf "gs://roll20-cdn/$CDN_SHEETS_FOLDER/%s\n" "{//}")\" \"$(printf "gs://roll20-cdn/$CDN_SHEETS_FOLDER/%s" "{//}")/dist\" \"$(printf "gs://roll20-cdn/$CDN_SHEETS_FOLDER/%s" "{//}")/translations\"' | tee -a $CWD/sync_sheets.sh