From cb23fa872a39337e6b8d063b58aa28d07a18d5fd Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Thu, 27 May 2021 14:48:54 -0700 Subject: [PATCH] docs: fix version redirect Signed-off-by: Andrea Luzzardi --- .github/workflows/docs.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 66b9c24f..6f1ba43e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -68,13 +68,22 @@ jobs: # landing alway on latest tag # use S3 Rediret objet # upload to /docs/index.html - - run: touch index.html - - name: Redirect Latest tag on landing - # FIXME - # if: ${{ steps.vars.outputs.tag != 'devel' }} + - name: Create index.html + run: | + cat < index.html + + + + + + + Nothing to see here; see the + latest version of the docs. + + + EOF + - name: Copy index.html + if: ${{ steps.vars.outputs.tag != 'devel' }} uses: ItsKarma/aws-cli@v1.70.0 with: - # FIXME: `--website-redirect` uses a permanent redirect, therefore if - # 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/ + args: s3 cp --cache-control max-age=0 ./index.html s3://docs.dagger.io/