Last active
May 6, 2020 07:51
-
-
Save tomas-chudjak/f71aa4f96d53ab9db047b5f81b88ee57 to your computer and use it in GitHub Desktop.
VSCode task to upload Hugo's public/ folder to s3 bucket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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>", | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For info about tasks See https://code.visualstudio.com/docs/editor/tasks#vscode
For info about inputs See https://code.visualstudio.com/docs/editor/variables-reference#_input-variables