From ea8cb7674a3633c8a188880583801dc73ec721aa Mon Sep 17 00:00:00 2001 From: Khushiyant Date: Tue, 30 Jan 2024 20:52:49 +0530 Subject: [PATCH] ci(fix): sphinx--deployment --- .github/workflows/sphinx.yml | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 1e63e92..e22be24 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -1,24 +1,18 @@ -name: "Sphinx: Render docs" +name: Deploy Sphinx documentation to Pages -on: push +on: + push: + branches: [main] # branch to trigger deployment jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: write + pages: + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: ammaraskar/sphinx-action@master - - name: Upload artifacts - uses: actions/upload-artifact@v4 + - id: deployment + uses: sphinx-notes/pages@v3 with: - name: html-docs - path: docs/build/html/ - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/main' + publish: false + - uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/build/html \ No newline at end of file + publish_dir: ${{ steps.deployment.outputs.artifact }} \ No newline at end of file