Merge pull request #516 from aluzzardi/fix-doc-redirect
docs: fix version redirect
This commit is contained in:
commit
15f4c4877d
25
.github/workflows/docs.yml
vendored
25
.github/workflows/docs.yml
vendored
@ -68,13 +68,22 @@ jobs:
|
|||||||
# landing alway on latest tag
|
# landing alway on latest tag
|
||||||
# use S3 Rediret objet
|
# use S3 Rediret objet
|
||||||
# upload to /docs/index.html
|
# upload to /docs/index.html
|
||||||
- run: touch index.html
|
- name: Create index.html
|
||||||
- name: Redirect Latest tag on landing
|
run: |
|
||||||
# FIXME
|
cat <<EOF > index.html
|
||||||
# if: ${{ steps.vars.outputs.tag != 'devel' }}
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="0; url=/${{steps.vars.outputs.tag}}">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
Nothing to see here; <a href="/${{steps.vars.outputs.tag}}">see the
|
||||||
|
latest version of the docs</a>.
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF
|
||||||
|
- name: Copy index.html
|
||||||
|
if: ${{ steps.vars.outputs.tag != 'devel' }}
|
||||||
uses: ItsKarma/aws-cli@v1.70.0
|
uses: ItsKarma/aws-cli@v1.70.0
|
||||||
with:
|
with:
|
||||||
# FIXME: `--website-redirect` uses a permanent redirect, therefore if
|
args: s3 cp --cache-control max-age=0 ./index.html s3://docs.dagger.io/
|
||||||
# we use the latest version it will be in cache forever.
|
|
||||||
# args: s3 cp --cache-control max-age=0 --website-redirect /docs/${{steps.vars.outputs.tag}}/ ./index.html s3://docs.dagger.io/docs/
|
|
||||||
args: s3 cp --cache-control max-age=0 --website-redirect /devel/ ./index.html s3://docs.dagger.io/
|
|
||||||
|
Reference in New Issue
Block a user