From cda6c6bc7e15c9d081baa3fe7b03a406c110015f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rosado?= Date: Wed, 23 Nov 2022 16:51:11 +0000 Subject: [PATCH] Update docs GitHub actions to deploy to unstable or latest (#977) --- .github/workflows/docs-release.yml | 9 +++++++++ .../workflows/{docs-latest.yml => docs-unstable.yml} | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) rename .github/workflows/{docs-latest.yml => docs-unstable.yml} (87%) diff --git a/.github/workflows/docs-release.yml b/.github/workflows/docs-release.yml index 56523062..83198a80 100644 --- a/.github/workflows/docs-release.yml +++ b/.github/workflows/docs-release.yml @@ -55,3 +55,12 @@ jobs: - name: Sync to S3 run: aws s3 sync --quiet ./docs/_build/html/ s3://docs.pyscript.net/${{ github.ref_name }}/ + + # Make sure to remove the latest folder so we sync the full docs upon release + - name: Delete latest directory + run: aws s3 rm --recursive s3://docs.pyscript.net/latest/ + + # Note that the files are the same as above, but we want to have folders with + # // AND /latest/ which latest will always point to the latest release + - name: Sync to /latest + run: aws s3 sync --quiet ./docs/_build/html/ s3://docs.pyscript.net/latest/ diff --git a/.github/workflows/docs-latest.yml b/.github/workflows/docs-unstable.yml similarity index 87% rename from .github/workflows/docs-latest.yml rename to .github/workflows/docs-unstable.yml index 9395edfd..460e368c 100644 --- a/.github/workflows/docs-latest.yml +++ b/.github/workflows/docs-unstable.yml @@ -50,11 +50,11 @@ jobs: aws-region: ${{ secrets.AWS_REGION }} role-to-assume: ${{ secrets.AWS_OIDC_RUNNER_ROLE }} - - name: Copy redirect file - run: aws s3 cp --quiet ./docs/_build/html/_static/redirect.html s3://docs.pyscript.net/index.html + # - name: Copy redirect file + # run: aws s3 cp --quiet ./docs/_build/html/_static/redirect.html s3://docs.pyscript.net/index.html - # - name: Delete latest directory - # run: aws s3 rm --recursive s3://docs.pyscript.net/latest/ + # - name: Delete unstable directory + # run: aws s3 rm --recursive s3://docs.pyscript.net/unsatble/ - name: Sync to S3 - run: aws s3 sync --quiet ./docs/_build/html/ s3://docs.pyscript.net/latest/ + run: aws s3 sync --quiet ./docs/_build/html/ s3://docs.pyscript.net/unstable/