Skip to content

Instantly share code, notes, and snippets.

@tomas-chudjak
Last active May 6, 2020
Embed
What would you like to do?
VSCode task to upload Hugo's public/ folder to s3 bucket
{
"version": "2.0.0",
"tasks": [
{
"label": "S3 deploy",
"type": "shell",
"command": "hugo --minify && aws s3 sync public/ ${input:s3bucket} --delete --exclude \"*css\" --exclude \"*.js\" --exclude \"*.png\" --exclude \"*.jpg\" --exclude \"*.woff\" && echo '--- s3 upload with cache-control: ---' && aws s3 cp public/ ${input:s3bucket} --recursive --exclude \"*\" --include \"*css\" --include \"*.js\" --include \"*.png\" --include \"*.jpg\" --include \"*.webp\" --include \"*.woff\" --cache-control \"max-age=31536000\"",
"group": "build",
"problemMatcher": []
},
],
"inputs": [
{
"id" : "s3bucket",
"type" : "promptString",
"description" : "S3 bucket variable",
"default": "<enter-name-of-your-s3-bucket>",
}
]
}
@tomas-chudjak

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment