From 6809b8fe7b2cf54af9fde1f179bfee7b180d5ace Mon Sep 17 00:00:00 2001 From: Arianna Renzini Date: Tue, 9 Apr 2024 09:50:32 +0000 Subject: [PATCH] Add new file --- .github%2Fworkflows/pages.yml | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github%2Fworkflows/pages.yml diff --git a/.github%2Fworkflows/pages.yml b/.github%2Fworkflows/pages.yml new file mode 100644 index 0000000..1810d78 --- /dev/null +++ b/.github%2Fworkflows/pages.yml @@ -0,0 +1,66 @@ +name: GitHub Pages + +permissions: + contents: read + pages: write + id-token: write + +on: + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: "0 0 * * 0" + +jobs: + build: + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - uses: s-weigand/setup-conda@v1 + with: + update-conda: true + python-version: "3.11" + conda-channels: anaconda, conda-forge + + - name: Install dependencies + run: | + sudo apt-get -yqq install pandoc + pip install --upgrade pip setuptools + pip install ipykernel ipython==8.12.0 jupyter + pip install sphinx numpydoc nbsphinx sphinx_rtd_theme sphinx-tabs autodoc ipython-genutils + pip install . + - name: Build documentation + run: | + cd docs + make clean + make html + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'docs/_build/html' + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4