diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..f327bf2 --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,52 @@ +name: Update documentation + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: write + id-token: write + pages: write + +jobs: + build: + name: Build documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v1 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install .[doc] + - name: Build with Sphinx + run: cd docs && make html + - name: Upload documentation artifact + uses: actions/upload-artifact@v2 + with: + name: documentation + path: ./doc/_build/html + upload: + name: Upload to GitHub pages + runs-on: ubuntu-latest + needs: build + steps: + - name: Download documentation artifact + uses: actions/download-artifact@v2 + with: + name: documentation + path: ./html + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./html + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 575bb58..9401326 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,10 @@ -name: Test +name: Run tests on: push: branches: ["main"] pull_request: + workflow_dispatch: jobs: unittest: diff --git a/docs/Makefile b/doc/Makefile similarity index 100% rename from docs/Makefile rename to doc/Makefile diff --git a/docs/_static/.keep b/doc/_static/.keep similarity index 100% rename from docs/_static/.keep rename to doc/_static/.keep diff --git a/docs/conf.py b/doc/conf.py similarity index 100% rename from docs/conf.py rename to doc/conf.py diff --git a/docs/dm_robotics.panda.rst b/doc/dm_robotics.panda.rst similarity index 100% rename from docs/dm_robotics.panda.rst rename to doc/dm_robotics.panda.rst diff --git a/docs/index.rst b/doc/index.rst similarity index 100% rename from docs/index.rst rename to doc/index.rst diff --git a/docs/make.bat b/doc/make.bat similarity index 100% rename from docs/make.bat rename to doc/make.bat diff --git a/docs/tutorial.rst b/doc/tutorial.rst similarity index 100% rename from docs/tutorial.rst rename to doc/tutorial.rst