From 1ccb5af08544b0353dd47a20c302ea7c037a67f2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 27 Sep 2025 16:31:14 +0900 Subject: [PATCH] Replace peaceiris/actions-gh-pages with actions/deploy-pages - Update main documentation deployment to use actions/deploy-pages - Split tutorial deployment into separate job that still uses peaceiris/actions-gh-pages - Add proper permissions for GitHub Pages deployment - Add CNAME file creation for custom domain support - Maintain existing functionality while using the official GitHub Pages action --- .github/workflows/doc.yml | 53 ++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 0c642969e9..37f16ac496 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -93,13 +93,18 @@ jobs: deploy: name: Publish Documentation permissions: - contents: write + contents: read + pages: write + id-token: write pull-requests: read issues: read repository-projects: read runs-on: ubuntu-latest needs: build-doc if: github.event_name == 'push' && github.ref == 'refs/heads/main' + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - uses: actions/checkout@v5 with: @@ -130,12 +135,48 @@ jobs: - name: Copy I18N Documentation run: find doc/build/mini18n-html -mindepth 1 -maxdepth 1 -type d -exec cp -rf {} doc/build/html/ \; - - name: Deploy to GH Pages - uses: peaceiris/actions-gh-pages@4b09552702d0b65573696410d4707c765da2630b + - name: Add CNAME file + run: echo "tutorial.pyvista.org" > doc/build/html/CNAME + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: doc/build/html - cname: tutorial.pyvista.org + path: doc/build/html + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + + deploy-tutorial: + name: Publish Tutorial Content + permissions: + contents: write + pull-requests: read + issues: read + repository-projects: read + runs-on: ubuntu-latest + needs: build-doc + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + steps: + - uses: actions/checkout@v5 + with: + persist-credentials: false + + - uses: actions/download-artifact@v5 + with: + name: doc-build-html + path: . + + - name: UnTar build + run: tar -xzvf doc-build-html.tar.gz + + - name: Zip Notebooks + run: | + cp -r doc/build/html/notebooks/tutorial/ notebooks + zip -r notebooks.zip notebooks/ - name: Copy Tutorial Content run: |