feat: add manual production deployment pipeline
Deploy EG-BIM QA Gateway / deploy (push) Failing after 7s
Deploy EG-BIM QA Gateway / deploy (push) Failing after 7s
This commit is contained in:
1 parent
1808f14cc6
commit
0755155368
13 files changed
+1391
-5
No files matched your search
+11
-2
@@ -2,12 +2,21 @@
|
||||
set -euo pipefail
|
||||
|
||||
bucket="${1:-baron-qa-pages}"
|
||||
config="${2:-wrangler.toml}"
|
||||
prefix="${3:-}"
|
||||
|
||||
if [ "$bucket" = "baron-qa-write" ]; then
|
||||
if [ "$config" != "wrangler.production.toml" ] || [[ ! "$prefix" =~ ^releases/[0-9a-f]{40}$ ]]; then
|
||||
echo "Production uploads require the production config and a full commit release prefix" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
upload() {
|
||||
local file="$1"
|
||||
local key="$2"
|
||||
local key="${prefix:+$prefix/}$2"
|
||||
local content_type="$3"
|
||||
npx wrangler r2 object put "$bucket/$key" --file "$file" --content-type "$content_type" --remote
|
||||
npx --no-install wrangler r2 object put "$bucket/$key" --config "$config" --file "$file" --content-type "$content_type" --remote
|
||||
}
|
||||
|
||||
upload egbim/index.html egbim/index.html text/html
|
||||
|
||||
Reference in new issue
Block a user