From cc7cffb18c492b48c9e70a9d00ed740cf6f4342e Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Wed, 1 Nov 2023 20:42:48 +0000 Subject: [PATCH] ci: reflect cookiecutter paths --- .github/workflows/deploy.yml | 19 ++++++++++++------- .github/workflows/tests.yml | 20 +++++++++++++++----- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 22df676..6aad29c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -36,18 +36,23 @@ jobs: - name: Install dependencies run: | pip install -r requirements.txt - - # Build the book - - name: Build the book + # Use default CC + - name: Cookiecutter no GHA run: | - jupyter-book build . - + 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/ # Upload the book's HTML as an artifact - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: - path: "_build/html" - + path: "my_book/my_book/_build/html" # Deploy the book's HTML to GitHub Pages - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8bfcff8..13ef0c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,14 +46,24 @@ jobs: - name: Pytest tests run: | pytest - # Build the example book - - name: Build default book + # Use default CC + - name: Cookiecutter no GHA + run: | + cookiecutter . --no-input --overwrite-if-exists include_ci=no + # Install requirements.txt + - name: Install requirements run: | - cookiecutter . --no-input --overwrite-if-exists pip install -r my_book/requirements.txt - jupyter-book build . + # Build the example book + - name: Build book + run: | + jupyter-book build my_book/my_book/ # Upload the book's HTML as an artifact - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: - path: "_build/html" \ No newline at end of file + path: "my_book/my_book/_build/html" + # Deploy the book's HTML to GitHub Pages + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 \ No newline at end of file