From 5956e26ac8c850d50395ce7a85d9b1df58b09de8 Mon Sep 17 00:00:00 2001 From: Chenlin Lu Date: Mon, 5 Aug 2024 00:18:03 -0400 Subject: [PATCH] Update sphinx.yml --- .github/workflows/sphinx.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 1b2384a..51ccbb4 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -1,34 +1,37 @@ +name: Sphinx build + +on: + push: + branches: + - main + workflow_dispatch: + jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.x' - - name: Install dependencies run: | python -m pip install --upgrade pip pip install sphinx sphinx_issues myst_parser nbsphinx sphinx_copybutton - - name: Build HTML uses: ammaraskar/sphinx-action@0.4 with: docs_folder: "docs/source" build_command: "sphinx-build -b html . ../build/html" - - name: Upload artifacts uses: actions/upload-artifact@v1 with: name: html-docs path: docs/build/html/ - - name: Deploy uses: peaceiris/actions-gh-pages@v3 if: github.ref == 'refs/heads/main' with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/build/html \ No newline at end of file + publish_dir: docs/build/html