mirror of https://github.com/docker/docs.git
start sending robots.txt (and humans.txt) again, and set to dissallow if its not the real docs site
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
This commit is contained in:
parent
7fa7c42ce2
commit
44e9a59665
|
@ -9,6 +9,8 @@ To publish the Docker documentation you need to set your access_key and secret_k
|
||||||
(with the keys in a [profile $AWS_S3_BUCKET] section - so you can have more than one set of keys in your file)
|
(with the keys in a [profile $AWS_S3_BUCKET] section - so you can have more than one set of keys in your file)
|
||||||
and set the AWS_S3_BUCKET env var to the name of your bucket.
|
and set the AWS_S3_BUCKET env var to the name of your bucket.
|
||||||
|
|
||||||
|
If you're publishing the current release's documentation, also set `BUILD_ROOT=yes`
|
||||||
|
|
||||||
make AWS_S3_BUCKET=docs-stage.docker.com docs-release
|
make AWS_S3_BUCKET=docs-stage.docker.com docs-release
|
||||||
|
|
||||||
will then push the documentation site to your s3 bucket.
|
will then push the documentation site to your s3 bucket.
|
||||||
|
@ -25,6 +27,16 @@ if [ "$$AWS_S3_BUCKET" == "docs.docker.com" ]; then
|
||||||
echo "Please do not push '-dev' documentation to docs.docker.com ($VERSION)"
|
echo "Please do not push '-dev' documentation to docs.docker.com ($VERSION)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
cat > ./sources/robots.txt <<'EOF'
|
||||||
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
|
EOF
|
||||||
|
|
||||||
|
else
|
||||||
|
cat > ./sources/robots.txt <<'EOF'
|
||||||
|
User-agent: *
|
||||||
|
Disallow: /
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove the last version - 1.0.2-dev -> 1.0
|
# Remove the last version - 1.0.2-dev -> 1.0
|
||||||
|
@ -74,7 +86,7 @@ upload_current_documentation() {
|
||||||
# a really complicated way to send only the files we want
|
# a really complicated way to send only the files we want
|
||||||
# if there are too many in any one set, aws s3 sync seems to fall over with 2 files to go
|
# if there are too many in any one set, aws s3 sync seems to fall over with 2 files to go
|
||||||
# versions.html_fragment
|
# versions.html_fragment
|
||||||
endings=( json html xml css js gif png JPG ttf svg woff html_fragment )
|
endings=( json txt html xml css js gif png JPG ttf svg woff html_fragment )
|
||||||
for i in ${endings[@]}; do
|
for i in ${endings[@]}; do
|
||||||
include=""
|
include=""
|
||||||
for j in ${endings[@]}; do
|
for j in ${endings[@]}; do
|
||||||
|
@ -82,11 +94,12 @@ upload_current_documentation() {
|
||||||
include="$include --exclude *.$j"
|
include="$include --exclude *.$j"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
include="--include *.$i $include"
|
||||||
echo "uploading *.$i"
|
echo "uploading *.$i"
|
||||||
run="aws s3 sync --profile $BUCKET --cache-control \"max-age=3600\" --acl public-read \
|
run="aws s3 sync --profile $BUCKET --cache-control \"max-age=3600\" --acl public-read \
|
||||||
$include \
|
$include \
|
||||||
--exclude *.txt \
|
|
||||||
--exclude *.text* \
|
--exclude *.text* \
|
||||||
|
--exclude *.*~ \
|
||||||
--exclude *Dockerfile \
|
--exclude *Dockerfile \
|
||||||
--exclude *.DS_Store \
|
--exclude *.DS_Store \
|
||||||
--exclude *.psd \
|
--exclude *.psd \
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
User-agent: *
|
|
||||||
Allow: /
|
|
Loading…
Reference in New Issue