From 8978396a8df7476c96af2c6934c8aa90e5806aca Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Mon, 4 Nov 2024 09:17:54 +0000 Subject: [PATCH 1/2] [OPENJDK-3391] Generate HTTP redirect pages to new site https://issues.redhat.com/browse/OPENJDK-3391 Signed-off-by: Jonathan Dowland --- .github/workflows/gendocs.yml | 39 +++ docs/create.sh | 16 ++ docs/moved.html | 469 ++++++++++++++++++++++++++++++++++ docs/uris_to_create | 93 +++++++ 4 files changed, 617 insertions(+) create mode 100644 .github/workflows/gendocs.yml create mode 100755 docs/create.sh create mode 100644 docs/moved.html create mode 100644 docs/uris_to_create diff --git a/.github/workflows/gendocs.yml b/.github/workflows/gendocs.yml new file mode 100644 index 00000000..b1e9d25d --- /dev/null +++ b/.github/workflows/gendocs.yml @@ -0,0 +1,39 @@ +name: Generate docs for OpenJDK images +on: + push: + branches: + - 'repository-moved' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + gendocs: + name: Generate documentation + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v2 + + - name: Generate docs + run: | + ./docs/create.sh + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: 'docs' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/docs/create.sh b/docs/create.sh new file mode 100755 index 00000000..57d16c3f --- /dev/null +++ b/docs/create.sh @@ -0,0 +1,16 @@ +if [ -d docs ]; then + cd docs +fi + +prefix=https://rh-openjdk.github.io/redhat-openjdk-containers/ + +while read path; do + d="$(dirname $path)" + mkdir -p "$d" + uri="$prefix/$path" + + sed "s!DESTINATION!$uri!g" \ + moved.html \ + > "$path" + +done < uris_to_create diff --git a/docs/moved.html b/docs/moved.html new file mode 100644 index 00000000..318bd2df --- /dev/null +++ b/docs/moved.html @@ -0,0 +1,469 @@ + + + + + + + + +This site has moved to rh-openjdk.github.io/redhat-openjdk-containers + + + + + +
+
+ + + + + +
+
Warning
+
+The Red Hat OpenJDK containers documentation has moved to https://rh-openjdk.github.io/redhat-openjdk-containers/. +
+
+
+

This page is now found at +DESTINATION.

+
+
+

Please update your bookmarks!

+
+
+

This page will auto-redirect in 10 seconds.

+
+
+ + diff --git a/docs/uris_to_create b/docs/uris_to_create new file mode 100644 index 00000000..ee4cff41 --- /dev/null +++ b/docs/uris_to_create @@ -0,0 +1,93 @@ +index.html +ubi9/ubi9-openjdk-11-runtime.html +ubi9/ubi9-openjdk-11.html +ubi9/ubi9-openjdk-17-runtime.html +ubi9/ubi9-openjdk-17.html +ubi9/ubi9-openjdk-21-runtime.html +ubi9/ubi9-openjdk-21.html +ubi9-openjdk-containers-1.20/ubi9-openjdk-11-runtime.html +ubi9-openjdk-containers-1.20/ubi9-openjdk-11.html +ubi9-openjdk-containers-1.20/ubi9-openjdk-17-runtime.html +ubi9-openjdk-containers-1.20/ubi9-openjdk-17.html +ubi9-openjdk-containers-1.20/ubi9-openjdk-21-runtime.html +ubi9-openjdk-containers-1.20/ubi9-openjdk-21.html +ubi9-openjdk-containers-1.18/ubi9-openjdk-11-runtime.html +ubi9-openjdk-containers-1.18/ubi9-openjdk-11.html +ubi9-openjdk-containers-1.18/ubi9-openjdk-17-runtime.html +ubi9-openjdk-containers-1.18/ubi9-openjdk-17.html +ubi9-openjdk-containers-1.18/ubi9-openjdk-21-runtime.html +ubi9-openjdk-containers-1.18/ubi9-openjdk-21.html +ubi9-openjdk-containers-1.17/ubi9-openjdk-11-runtime.html +ubi9-openjdk-containers-1.17/ubi9-openjdk-11.html +ubi9-openjdk-containers-1.17/ubi9-openjdk-17-runtime.html +ubi9-openjdk-containers-1.17/ubi9-openjdk-17.html +ubi9-openjdk-containers-1.17/ubi9-openjdk-21-runtime.html +ubi9-openjdk-containers-1.17/ubi9-openjdk-21.html +ubi9-openjdk-containers-1.16/ubi9-openjdk-11-runtime.html +ubi9-openjdk-containers-1.16/ubi9-openjdk-11.html +ubi9-openjdk-containers-1.16/ubi9-openjdk-17-runtime.html +ubi9-openjdk-containers-1.16/ubi9-openjdk-17.html +ubi9-openjdk-containers-1.15/ubi9-openjdk-11-runtime.html +ubi9-openjdk-containers-1.15/ubi9-openjdk-11.html +ubi9-openjdk-containers-1.15/ubi9-openjdk-17-runtime.html +ubi9-openjdk-containers-1.15/ubi9-openjdk-17.html +ubi9-openjdk-containers-1.13/ubi9-openjdk-11-runtime.html +ubi9-openjdk-containers-1.13/ubi9-openjdk-11.html +ubi9-openjdk-containers-1.13/ubi9-openjdk-17-runtime.html +ubi9-openjdk-containers-1.13/ubi9-openjdk-17.html +ubi8/ubi8-openjdk-11-runtime.html +ubi8/ubi8-openjdk-11.html +ubi8/ubi8-openjdk-17-runtime.html +ubi8/ubi8-openjdk-17.html +ubi8/ubi8-openjdk-21-runtime.html +ubi8/ubi8-openjdk-21.html +ubi8/ubi8-openjdk-8-runtime.html +ubi8/ubi8-openjdk-8.html +ubi8-openjdk-containers-1.20/ubi8-openjdk-11-runtime.html +ubi8-openjdk-containers-1.20/ubi8-openjdk-11.html +ubi8-openjdk-containers-1.20/ubi8-openjdk-17-runtime.html +ubi8-openjdk-containers-1.20/ubi8-openjdk-17.html +ubi8-openjdk-containers-1.20/ubi8-openjdk-21-runtime.html +ubi8-openjdk-containers-1.20/ubi8-openjdk-21.html +ubi8-openjdk-containers-1.20/ubi8-openjdk-8-runtime.html +ubi8-openjdk-containers-1.20/ubi8-openjdk-8.html +ubi8-openjdk-containers-1.19/ubi8-openjdk-11-runtime.html +ubi8-openjdk-containers-1.19/ubi8-openjdk-11.html +ubi8-openjdk-containers-1.19/ubi8-openjdk-17-runtime.html +ubi8-openjdk-containers-1.19/ubi8-openjdk-17.html +ubi8-openjdk-containers-1.19/ubi8-openjdk-21-runtime.html +ubi8-openjdk-containers-1.19/ubi8-openjdk-21.html +ubi8-openjdk-containers-1.19/ubi8-openjdk-8-runtime.html +ubi8-openjdk-containers-1.19/ubi8-openjdk-8.html +ubi8-openjdk-containers-1.18/ubi8-openjdk-11-runtime.html +ubi8-openjdk-containers-1.18/ubi8-openjdk-11.html +ubi8-openjdk-containers-1.18/ubi8-openjdk-17-runtime.html +ubi8-openjdk-containers-1.18/ubi8-openjdk-17.html +ubi8-openjdk-containers-1.18/ubi8-openjdk-21-runtime.html +ubi8-openjdk-containers-1.18/ubi8-openjdk-21.html +ubi8-openjdk-containers-1.18/ubi8-openjdk-8-runtime.html +ubi8-openjdk-containers-1.18/ubi8-openjdk-8.html +ubi8-openjdk-containers-1.17/ubi8-openjdk-11-runtime.html +ubi8-openjdk-containers-1.17/ubi8-openjdk-11.html +ubi8-openjdk-containers-1.17/ubi8-openjdk-17-runtime.html +ubi8-openjdk-containers-1.17/ubi8-openjdk-17.html +ubi8-openjdk-containers-1.17/ubi8-openjdk-8-runtime.html +ubi8-openjdk-containers-1.17/ubi8-openjdk-8.html +ubi8-openjdk-containers-1.16/ubi8-openjdk-11-runtime.html +ubi8-openjdk-containers-1.16/ubi8-openjdk-11.html +ubi8-openjdk-containers-1.16/ubi8-openjdk-17-runtime.html +ubi8-openjdk-containers-1.16/ubi8-openjdk-17.html +ubi8-openjdk-containers-1.16/ubi8-openjdk-8-runtime.html +ubi8-openjdk-containers-1.16/ubi8-openjdk-8.html +ubi8-openjdk-containers-1.15/ubi8-openjdk-11-runtime.html +ubi8-openjdk-containers-1.15/ubi8-openjdk-11.html +ubi8-openjdk-containers-1.15/ubi8-openjdk-17-runtime.html +ubi8-openjdk-containers-1.15/ubi8-openjdk-17.html +ubi8-openjdk-containers-1.15/ubi8-openjdk-8-runtime.html +ubi8-openjdk-containers-1.15/ubi8-openjdk-8.html +ubi8-openjdk-containers-1.14/ubi8-openjdk-11-runtime.html +ubi8-openjdk-containers-1.14/ubi8-openjdk-11.html +ubi8-openjdk-containers-1.14/ubi8-openjdk-17-runtime.html +ubi8-openjdk-containers-1.14/ubi8-openjdk-17.html +ubi8-openjdk-containers-1.14/ubi8-openjdk-8-runtime.html +ubi8-openjdk-containers-1.14/ubi8-openjdk-8.html From 540e71a6278542b8ab43711e4e4ae7c62f98bd13 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Wed, 6 Nov 2024 09:41:37 +0000 Subject: [PATCH 2/2] Bump GH Pages Actions to recent versions actions/upload-pages-artifact@v1 uses Artifact actions v3 which will be deprecated on 2024-12-05. Updating upload-pages-artifact to v3 requires updating deploy-pages to v4. Take the opportunity to update configure-pages@v5 as well. Signed-off-by: Jonathan Dowland --- .github/workflows/gendocs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gendocs.yml b/.github/workflows/gendocs.yml index b1e9d25d..b7cf8d75 100644 --- a/.github/workflows/gendocs.yml +++ b/.github/workflows/gendocs.yml @@ -27,13 +27,13 @@ jobs: ./docs/create.sh - name: Setup Pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v5 - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: path: 'docs' - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4