From 8f63652d7451340326614d6da744dff99fbbe7f9 Mon Sep 17 00:00:00 2001 From: Subhankar Maiti Date: Fri, 3 Oct 2025 16:45:34 +0530 Subject: [PATCH 1/4] configure Git user for gh-pages deployment --- .github/workflows/publish-docs.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index fe3fe6bf..01d9967d 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -57,5 +57,10 @@ jobs: - name: Run cleanup and manage document versions run: node scripts/manage-doc-versions.js + - name: Configure Git user for gh-pages + run: | + git config --global user.email "action@github.com" + git config --global user.name "GitHub Action" + - name: Deploy to github pages using gh-pages run: npx gh-pages -d docs From fde9f9d0eaac2df728b2d5ff91cf3bd4c06d5815 Mon Sep 17 00:00:00 2001 From: Subhankar Maiti Date: Fri, 3 Oct 2025 16:55:25 +0530 Subject: [PATCH 2/4] fix: update GitHub Actions workflow for documentation publishing --- .github/workflows/publish-docs.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 01d9967d..ebf673b0 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -28,13 +28,20 @@ jobs: with: name: documentation path: documentation.tar + retention-days: 1 - build: # builds the distribution and then the documentation + build_and_deploy: # builds the distribution and then the documentation needs: get_history runs-on: ubuntu-latest + permissions: + contents: write + pages: write + id-token: write steps: - name: Checkout src uses: actions/checkout@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} - name: Download the existing documents artifact uses: actions/download-artifact@v5 @@ -62,5 +69,7 @@ jobs: git config --global user.email "action@github.com" git config --global user.name "GitHub Action" - - name: Deploy to github pages using gh-pages + - name: Deploy to GitHub Pages using gh-pages run: npx gh-pages -d docs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3fded58a244d78c4d4eaf909aa414d53cc0ebf96 Mon Sep 17 00:00:00 2001 From: Subhankar Maiti Date: Fri, 3 Oct 2025 17:13:15 +0530 Subject: [PATCH 3/4] refactor: streamline GitHub Pages deployment workflow --- .github/workflows/publish-docs.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index ebf673b0..186434f7 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -33,6 +33,9 @@ jobs: build_and_deploy: # builds the distribution and then the documentation needs: get_history runs-on: ubuntu-latest + environment: + name: release + url: ${{ steps.deployment.outputs.page_url }} permissions: contents: write pages: write @@ -64,12 +67,14 @@ jobs: - name: Run cleanup and manage document versions run: node scripts/manage-doc-versions.js - - name: Configure Git user for gh-pages - run: | - git config --global user.email "action@github.com" - git config --global user.name "GitHub Action" + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: docs - - name: Deploy to GitHub Pages using gh-pages - run: npx gh-pages -d docs - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From b1aaf28f43c0fcbfba6733c9eec5acd6aaf2e373 Mon Sep 17 00:00:00 2001 From: Subhankar Maiti Date: Fri, 31 Oct 2025 13:00:10 +0530 Subject: [PATCH 4/4] refactor: streamline GitHub Actions workflow for documentation deployment --- .github/workflows/publish-docs.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 49102597..e6e4b46e 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -33,18 +33,13 @@ jobs: build_and_deploy: # builds the distribution and then the documentation needs: get_history runs-on: ubuntu-latest - environment: - name: release - url: ${{ steps.deployment.outputs.page_url }} permissions: contents: write - pages: write - id-token: write steps: - name: Checkout src uses: actions/checkout@v5 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ github.token }} - name: Download the existing documents artifact uses: actions/download-artifact@v6 @@ -67,14 +62,9 @@ jobs: - name: Run cleanup and manage document versions run: node scripts/manage-doc-versions.js - - name: Setup Pages - uses: actions/configure-pages@v4 - - - name: Upload pages artifact - uses: actions/upload-pages-artifact@v3 - with: - path: docs - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ github.token }} + publish_dir: ./docs + keep_files: false