diff --git a/.github/workflows/release-to-maven-central.yml b/.github/workflows/release-to-maven-central.yml index 98614407253..d3e3ade3ea3 100644 --- a/.github/workflows/release-to-maven-central.yml +++ b/.github/workflows/release-to-maven-central.yml @@ -68,22 +68,31 @@ jobs: MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - - name: Deploy Asciidoc docs output to GitHub Pages + - name: Deploy documentation to GitHub Pages for version ${{ github.event.inputs.releaseversion }} uses: JamesIves/github-pages-deploy-action@v4.7.2 with: - branch: gh-pages # The branch the action should deploy to. - folder: spring-boot-admin-docs/target/generated-docs # The folder the action should deploy. + branch: gh-pages + folder: spring-boot-admin-docs/target/generated-docs target-folder: ${{ github.event.inputs.releaseversion }} - clean: true # Automatically remove deleted files from the deploy branch + clean: true - - name: Deploy Asciidoc docs output to GitHub Pages + - name: Deploy redirect for /current to /${{ github.event.inputs.releaseversion }} uses: JamesIves/github-pages-deploy-action@v4.7.2 if: github.event.inputs.copyDocsToCurrent == 'true' with: - branch: gh-pages # The branch the action should deploy to. - folder: spring-boot-admin-docs/target/generated-docs/current # The folder the action should deploy. + branch: gh-pages + folder: spring-boot-admin-docs/target/generated-docs/current target-folder: /current - clean: true # Automatically remove deleted files from the deploy branch + clean: true + + - name: Deploy deeplink redirect for /current/* to /${{ github.event.inputs.releaseversion }}/* + uses: JamesIves/github-pages-deploy-action@v4.7.2 + if: github.event.inputs.copyDocsToCurrent == 'true' + with: + branch: gh-pages + folder: spring-boot-admin-docs/target/generated-docs/current + target-folder: / + clean: false publish-github-release: needs: publish-central-and-pages diff --git a/spring-boot-admin-docs/src/site/.gitignore b/spring-boot-admin-docs/src/site/.gitignore index e3383dad8fc..904f63bb03c 100644 --- a/spring-boot-admin-docs/src/site/.gitignore +++ b/spring-boot-admin-docs/src/site/.gitignore @@ -18,3 +18,4 @@ npm-debug.log* current/index.html +current/404.html diff --git a/spring-boot-admin-docs/src/site/current/404.template.html b/spring-boot-admin-docs/src/site/current/404.template.html new file mode 100644 index 00000000000..ed2e0774801 --- /dev/null +++ b/spring-boot-admin-docs/src/site/current/404.template.html @@ -0,0 +1,111 @@ + + +
+ +There isn't a GitHub Pages site here.
+ ++ Did you mean to visit docs.spring-boot-admin.com? + Please note that this site belongs to a GitHub user and is + not an official GitHub site. +
+ + +