Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
Hopefully fixing the incorrect copying of the entire subdirectory
scottlet authored Jun 17, 2020
1 parent f4aa9d1 commit e360031
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e360031

Please sign in to comment.