From e360031f67771c473adf61ecd38c1f825fa39a4a Mon Sep 17 00:00:00 2001 From: Scott van Looy Date: Wed, 17 Jun 2020 17:47:11 +0200 Subject: [PATCH] Update entrypoint.sh Hopefully fixing the incorrect copying of the entire subdirectory --- entrypoint.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index b9e3e4f..bce7295 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,10 +5,11 @@ echo "$INPUT_SERVICE_KEY" | base64 --decode > "$HOME"/service_key.json gcloud auth activate-service-account --key-file="$HOME"/service_key.json --project "$INPUT_PROJECT" -gsutil -m cp -z "css,js,html,svg,json" -r "$INPUT_BUILD_FOLDER/" gs://"$INPUT_BUCKET_NAME" +cd "$INPUT_BUILD_FOLDER" +gsutil -m cp -z "css,js,html,svg,json" -r . gs://"$INPUT_BUCKET_NAME" #gsutil web set -m "$INPUT_HOME_PAGE_PATH" -e "$INPUT_ERROR_PAGE_PATH" gs://"$INPUT_BUCKET_NAME" gsutil -m setmeta -h "Cache-Control:public, max-age=31536000" gs://"$INPUT_BUCKET_NAME"/**/*.js gsutil -m setmeta -h "Cache-Control:public, max-age=31536000" gs://"$INPUT_BUCKET_NAME"/**/*.css gsutil -m setmeta -h "Cache-Control:public, max-age=31536000" gs://"$INPUT_BUCKET_NAME"/**/*.svg -gsutil -m setmeta -h "Cache-Control:public, max-age=20" gs://"$INPUT_BUCKET_NAME"/*.json -gsutil -m setmeta -h "Cache-Control:public, max-age=20" gs://"$INPUT_BUCKET_NAME"/*.html +gsutil -m setmeta -h "Cache-Control:public, max-age=20" gs://"$INPUT_BUCKET_NAME"/**/*.json +gsutil -m setmeta -h "Cache-Control:public, max-age=20" gs://"$INPUT_BUCKET_NAME"/**/*.html