perf(static-sites): parallelize Bunny transfers
This commit is contained in:
parent
d9ea6cf9b7
commit
10132c10e3
4 changed files with 143 additions and 7 deletions
|
|
@ -21,6 +21,10 @@ inputs:
|
|||
description: Report changes without uploading or deleting files.
|
||||
required: false
|
||||
default: "false"
|
||||
workers:
|
||||
description: Maximum concurrent Bunny Storage transfers.
|
||||
required: false
|
||||
default: "16"
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
|
|
@ -33,9 +37,10 @@ runs:
|
|||
BUNNY_STORAGE_ENDPOINT: ${{ inputs.storage-endpoint }}
|
||||
BUNNY_PURGE_ENDPOINT: ${{ inputs.purge-endpoint }}
|
||||
STATIC_SITE_DRY_RUN: ${{ inputs.dry-run }}
|
||||
STATIC_SITE_WORKERS: ${{ inputs.workers }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
args=(bunny "$STATIC_SITE_DIRECTORY")
|
||||
args=(bunny "$STATIC_SITE_DIRECTORY" --workers "$STATIC_SITE_WORKERS")
|
||||
if [[ "$STATIC_SITE_DRY_RUN" == "true" ]]; then
|
||||
args+=(--dry-run)
|
||||
elif [[ "$STATIC_SITE_DRY_RUN" != "false" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue