| 1 |
# Test the deploy command. |
| 2 |
|
| 3 |
hugo deploy -h |
| 4 |
stdout 'Deploy your project to a cloud provider' |
| 5 |
mkdir mybucket |
| 6 |
hugo deploy --target mydeployment --invalidateCDN=false |
| 7 |
grep 'hello' mybucket/index.html |
| 8 |
replace public/index.html 'hello' 'changed' |
| 9 |
hugo deploy --target mydeployment --dryRun |
| 10 |
stdout 'Would upload: index.html' |
| 11 |
stdout 'Would invalidate CloudFront CDN with ID foobar' |
| 12 |
-- hugo.toml -- |
| 13 |
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"] |
| 14 |
baseURL = "https://example.org/" |
| 15 |
[deployment] |
| 16 |
[[deployment.targets]] |
| 17 |
name = "myfirst" |
| 18 |
url="gs://asdfasdf" |
| 19 |
[[deployment.targets]] |
| 20 |
name = "mydeployment" |
| 21 |
url="file://./mybucket" |
| 22 |
cloudFrontDistributionID = "foobar" |
| 23 |
-- public/index.html -- |
| 24 |
<html><body>hello</body></html> |