From b7c4dc3e041e19a57605fa432061b2297da709d3 Mon Sep 17 00:00:00 2001 From: Benjamin Bollen Date: Mon, 18 Nov 2024 19:16:19 +0000 Subject: [PATCH 1/2] (workflow): update docs for beta & stable --- .github/workflows/deploy-mkdocs.yml | 45 +++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-mkdocs.yml b/.github/workflows/deploy-mkdocs.yml index c368dc6..8aa6495 100644 --- a/.github/workflows/deploy-mkdocs.yml +++ b/.github/workflows/deploy-mkdocs.yml @@ -3,7 +3,9 @@ name: Deploy MkDocs to GitHub Pages on: push: branches: - - v0.3.6-docs + - beta + - candidate/stable + - testdocs jobs: deploy: @@ -33,8 +35,47 @@ jobs: cd docs/ mkdocs build + - name: Create Redirect Index + run: | + echo ' + + + + + +

Redirecting to the latest beta documentation...

+ + ' > ./docs/site/index.html + + - name: Determine Deployment Directory + id: branch + run: | + if [[ "${GITHUB_REF_NAME}" == "beta" ]]; then + echo "DEPLOY_DIR=beta" >> $GITHUB_ENV + elif [[ "${GITHUB_REF_NAME}" == "candidate/stable" ]]; then + echo "DEPLOY_DIR=candidate" >> $GITHUB_ENV + else + echo "Unknown branch: ${GITHUB_REF_NAME}" && exit 1 + fi + + - name: Prepare Deployment Directory + run: | + mkdir -p ./gh-pages/${{ env.DEPLOY_DIR }} + cp -R ./docs/site/* ./gh-pages/${{ env.DEPLOY_DIR }} + if [[ "${GITHUB_REF_NAME}" == "beta" ]]; then + echo ' + + + + + +

Redirecting to the latest beta documentation...

+ + ' > ./gh-pages/index.html + fi + - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/site \ No newline at end of file + publish_dir: ./gh-pages From 5fb3ce4686bc066eff1490a9af6cb9164844dcfc Mon Sep 17 00:00:00 2001 From: Benjamin Bollen Date: Mon, 18 Nov 2024 19:22:13 +0000 Subject: [PATCH 2/2] (workflow): temporarily add doc building to testdocs branch --- .github/workflows/deploy-mkdocs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy-mkdocs.yml b/.github/workflows/deploy-mkdocs.yml index 8aa6495..50334b6 100644 --- a/.github/workflows/deploy-mkdocs.yml +++ b/.github/workflows/deploy-mkdocs.yml @@ -54,6 +54,8 @@ jobs: echo "DEPLOY_DIR=beta" >> $GITHUB_ENV elif [[ "${GITHUB_REF_NAME}" == "candidate/stable" ]]; then echo "DEPLOY_DIR=candidate" >> $GITHUB_ENV + elif [[ "${GITHUB_REF_NAME}" == "testdoc" ]]; then + echo "DEPLOY_DIR=test" >> $GITHUB_ENV else echo "Unknown branch: ${GITHUB_REF_NAME}" && exit 1 fi