Skip to content

Commit

Permalink
fix s3 config
Browse files Browse the repository at this point in the history
Brian J. Cardiff committed Jun 30, 2016

Verified

This commit was signed with the committer’s verified signature. The key has expired.
1 parent 9412541 commit ed7e587
Showing 1 changed file with 26 additions and 29 deletions.
55 changes: 26 additions & 29 deletions bin/ci
Original file line number Diff line number Diff line change
@@ -99,41 +99,38 @@ deploy() {
on_deploy on_tag aws s3 sync doc/ s3://crystal-api/api/$CURRENT_TAG
cat - > .aws-config <<EOF
{
"WebsiteConfiguration": {
"IndexDocument": {
"Suffix": "index.html"
"IndexDocument": {
"Suffix": "index.html"
},
"RoutingRules": [
{
"Condition": {
"KeyPrefixEquals": "api/latest/"
},
"Redirect": {
"HttpRedirectCode": "302",
"ReplaceKeyPrefixWith": "api/${CURRENT_TAG}/",
"Protocol": "https",
"HostName": "crystal-lang.org"
}
},
"RoutingRules": [
{
"Condition": {
"KeyPrefixEquals": "api/latest/"
},
"Redirect": {
"HttpRedirectCode": "302",
"ReplaceKeyPrefixWith": "api/${CURRENT_TAG}/",
"Protocol": "https",
"HostName": "crystal-lang.org"
}
{
"Condition": {
"KeyPrefixEquals": "api/",
"HttpErrorCodeReturnedEquals": "404"
},
{
"Condition": {
"KeyPrefixEquals": "api/",
"HttpErrorCodeReturnedEquals": "404"
},
"Redirect": {
"HttpRedirectCode": "301",
"ReplaceKeyPrefixWith": "api/latest/",
"Protocol": "https",
"HostName": "crystal-lang.org"
}
"Redirect": {
"HttpRedirectCode": "301",
"ReplaceKeyPrefixWith": "api/latest/",
"Protocol": "https",
"HostName": "crystal-lang.org"
}
]
}
}
]
}
EOF
on_deploy on_tag cat .aws-config
on_deploy on_tag aws s3api put-bucket-website --bucket crystal-api --website-configuration .aws-config

on_deploy on_tag aws s3api put-bucket-website --bucket crystal-api --website-configuration file://.aws-config
}

prepare_build() {

0 comments on commit ed7e587

Please sign in to comment.