From f7710daf7a0afabadf072ee5577ee04cea4f1565 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Thu, 17 Oct 2024 19:14:56 -0700 Subject: [PATCH 1/2] rm requirements.txt --- noxfile.py | 2 -- pyproject.toml | 1 + requirements.txt | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 requirements.txt diff --git a/noxfile.py b/noxfile.py index c902a0d..07ada97 100644 --- a/noxfile.py +++ b/noxfile.py @@ -50,7 +50,6 @@ @nox.session def docs(session): """Build the packaging guide.""" - session.install("-r", "requirements.txt") session.install("-e", ".") session.run( SPHINX_BUILD, @@ -100,7 +99,6 @@ def docs_live(session): so they don't need to remember the specific sphinx-build parameters to build a different language. """ session.install("-e", ".[dev]") - session.install("-r", "requirements.txt") if not os.path.exists(OUTPUT_DIR): os.makedirs(OUTPUT_DIR) # Make sure jupy text syncs things diff --git a/pyproject.toml b/pyproject.toml index fb3895d..e781279 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ dependencies = [ "sphinx-inline-tabs", # for project cards "matplotlib", + "pandas", ] [project.optional-dependencies] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 1411a4a..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pandas \ No newline at end of file From fdc85bdb798fa231762b9983e0ddb3f8cc18e93c Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Thu, 17 Oct 2024 19:15:06 -0700 Subject: [PATCH 2/2] new style gh pages deploy --- .github/workflows/build-book.yml | 40 ++++++++++++++------------------ 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-book.yml b/.github/workflows/build-book.yml index 78bcacd..a26f2c0 100644 --- a/.github/workflows/build-book.yml +++ b/.github/workflows/build-book.yml @@ -16,22 +16,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.11" + cache: "pip" - - name: Upgrade pip - run: | - # install pip=>20.1 to use "pip cache dir" - python3 -m pip install --upgrade pip - - name: Get pip cache dir - id: pip-cache - run: echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - name: Install dependencies run: python3 -m pip install nox @@ -39,7 +25,7 @@ jobs: - name: Build book run: nox -s docs - # Save html as artifact + # Save html as artifact for CircleCI viewing - name: Save book html as artifact for viewing uses: actions/upload-artifact@v4 with: @@ -47,14 +33,11 @@ jobs: path: | _build/html/ - # Push the book's HTML to github-pages - - name: Push to GitHub Pages - # Only push if on main branch + - name: Upload gh pages artifact + uses: actions/upload-pages-artifact@v3 if: github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v4.0.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_build/html + with: + path: _build/html # Test for bad links and ensure alt tags for usability - name: Check HTML using htmlproofer @@ -65,3 +48,14 @@ jobs: --ignore-files "/.+\/_static\/.+/,/genindex.html/" --ignore-status-codes "404, 403, 429, 503" continue-on-error: true + + deploy: + runs-on: ubuntu-latest + needs: build-book + if: github.ref == 'refs/heads/main' + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + +