From bb396b6f9ad622687292580088adabc0ed457bbf Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 28 Sep 2023 15:35:05 +0100 Subject: [PATCH] Deploy docs with RTD --- .github/workflows/publish.yml | 53 ----------------------------------- .readthedocs.yml | 21 ++++++++++++++ 2 files changed, 21 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/publish.yml create mode 100644 .readthedocs.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index ad5a9ca..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: deploy - -on: - # Trigger the deploy on push to main branch - push: - branches: - - main - - add-jupyter-books-docs - schedule: - # jupyter-book is updated regularly, let's run this deployment every month in case something fails - # - # https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07 - # https://crontab.guru/every-month - # Run cron job every month - - cron: '0 0 1 * *' - -jobs: - # This job deploys the example book - deploy-example-book: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - python-version: [3.10] - steps: - - uses: actions/checkout@v2 - # Install CC - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - pip install -r requirements.txt - # Use default CC - - name: Cookiecutter no GHA - run: | - cookiecutter . --no-input include_ci=no - # Install requirements.txt - - name: Install requirements - run: | - pip install -r my_book/requirements.txt - # Build the example book - - name: Build book - run: | - jupyter-book build my_book/my_book/ - # Deploy html to gh-pages - - name: GitHub Pages action - uses: peaceiris/actions-gh-pages@v3.6.1 - with: - github_token: ${{ secrets.REPO_TOKEN }} - publish_dir: my_book/my_book/_build/html - publish_branch: gh-pages \ No newline at end of file diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..77eec5e --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,21 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.10" + jobs: + pre_build: + # Generate the Sphinx configuration for this Jupyter Book so it builds. + - "jupyter-book config sphinx docs/" + +python: + install: + - method: pip + path: . + extra_requirements: + - sphinx + +sphinx: + builder: html + fail_on_warning: true \ No newline at end of file