Skip to content

Commit

Permalink
set cache control on upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott van Looy committed Jan 19, 2022
1 parent ae42861 commit 5e6dcce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "$INPUT_SERVICE_KEY" | base64 --decode > "$HOME"/service_key.json
gcloud auth activate-service-account --key-file="$HOME"/service_key.json --project "$INPUT_PROJECT"

cd "$INPUT_BUILD_FOLDER"
gsutil -m cp -z "css,js,html,svg,json" -r . gs://"$INPUT_BUCKET_NAME"
gsutil -h "Cache-Control:no-cache,no-store,must-revalidate" -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
Expand Down

0 comments on commit 5e6dcce

Please sign in to comment.