From 477c8bcef81bf03eb1e066fa44d90c948fdfb6bd Mon Sep 17 00:00:00 2001 From: maurerv Date: Thu, 26 Oct 2023 13:54:04 +0200 Subject: [PATCH] Added docs to CI/CD --- .github/workflows/python-app.yml | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 10b52c7..e1c9963 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -31,3 +31,55 @@ jobs: - name: Test with pytest run: | pytest + + + docs: + runs-on: ubuntu-latest + container: + image: python:3.9 + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Build Docs + run: | + python -mpip install . + python -mpip install Sphinx pydata-sphinx-theme sphinx_design numpydoc sphinx_copybutton + cd doc + make clean + make html + mkdir -p ../public + mv _build/html/* ../public/ + + - name: Upload Public as Artifact + uses: actions/upload-artifact@v2 + with: + name: public + path: public + + + pages: + runs-on: ubuntu-latest + needs: docs + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Download Public Artifacts + uses: actions/download-artifact@v2 + with: + name: public + path: ./public + + - name: List directory after downloading artifact + run: | + ls -al + ls -al ./public + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public