From f59ae59d2309c1b00b50e73ab5ea212cca34c61c Mon Sep 17 00:00:00 2001 From: Emma Marshall <55526386+e-marshall@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:15:05 -0700 Subject: [PATCH 1/7] Update deploy.yml fix typo --- .github/workflows/deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 91231bb..58b25a1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,7 +1,5 @@ name: deploy-book -name: deploy-book - # Run this when the master or main branch changes on: push: From 5e209edf7cd7a0e054702303a1cee1c954f575d5 Mon Sep 17 00:00:00 2001 From: Emma Marshall <55526386+e-marshall@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:19:20 -0700 Subject: [PATCH 2/7] Update deploy.yml fixes to actions yml --- .github/workflows/deploy.yml | 83 +++++++++++++++++------------------- 1 file changed, 39 insertions(+), 44 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 58b25a1..96af19d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,60 +1,55 @@ name: deploy-book -# Run this when the master or main branch changes +name: on-push + on: push: branches: - master - main - # If your git repository has the Jupyter Book within some-subfolder next to - # unrelated files, you can make this run only if a file within that specific - # folder has been modified. - # - # paths: - # - some-subfolder/** + tags: + - '*' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true -# This job installs dependencies, builds the book, and pushes it to `gh-pages` jobs: - deploy-book: + jupyterbook: + name: build jupyter book runs-on: ubuntu-latest - permissions: - pages: write - id-token: write - steps: - - uses: actions/checkout@v3 - - # Install dependencies - - name: Set up Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - - name: Install dependencies - run: | - pip install -r requirements.txt + defaults: + run: + shell: bash -l {0} - # (optional) Cache your executed notebooks between runs - # if you have config: - # execute: - # execute_notebooks: cache - - name: cache executed notebooks - uses: actions/cache@v3 + steps: + - name: Checkout + uses: actions/checkout@v3 + + #- name: Codespell with annotations + # uses: codespell-project/actions-codespell@v1.0 + + + - name: Install Conda Environment + uses: mamba-org/provision-with-micromamba@v13 with: - path: _build/.jupyter_cache - key: jupyter-book-cache-${{ hashFiles('requirements.txt') }} + environment-file: binder/environment.yml + cache-env: true + cache-env-key: ubuntu-latest-3.10 - # Build the book - - name: Build the book + - name: Build Jupyter Book run: | jupyter-book build . - - # Upload the book's HTML as an artifact - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + + - name: Dump Build Logs + if: always() + run: | + if (test -a _build/html/reports/*log); then cat _build/html/reports/*log ; fi + + - name: Publish to GitHub Pages + if: github.ref == 'refs/heads/master' + uses: peaceiris/actions-gh-pages@v3 with: - path: "_build/html" - - # Deploy the book's HTML to GitHub Pages - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/html + publish_branch: gh-pages From 2695858429f98cc4ddfebdd4ba8f3da5cd248ce1 Mon Sep 17 00:00:00 2001 From: Emma Marshall <55526386+e-marshall@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:20:37 -0700 Subject: [PATCH 3/7] Update deploy.yml fix typo --- .github/workflows/deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 96af19d..95eeff0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,7 +1,5 @@ name: deploy-book -name: on-push - on: push: branches: From f259fa8934dbd2ffecfba9d1a922b83481a05cc8 Mon Sep 17 00:00:00 2001 From: Emma Marshall <55526386+e-marshall@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:43:12 -0700 Subject: [PATCH 4/7] Update deploy.yml switch head branch in deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 95eeff0..8ccd70d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,7 +4,7 @@ on: push: branches: - master - - main + #- main tags: - '*' From 4a655d2a5662763d022b54a760c6658b8dd7d4ef Mon Sep 17 00:00:00 2001 From: Emma Marshall <55526386+e-marshall@users.noreply.github.com> Date: Sun, 18 Feb 2024 12:53:41 -0700 Subject: [PATCH 5/7] Update and rename deploy.yml to on-push.yml --- .github/workflows/{deploy.yml => on-push.yml} | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) rename .github/workflows/{deploy.yml => on-push.yml} (91%) diff --git a/.github/workflows/deploy.yml b/.github/workflows/on-push.yml similarity index 91% rename from .github/workflows/deploy.yml rename to .github/workflows/on-push.yml index 8ccd70d..d150e55 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/on-push.yml @@ -1,13 +1,15 @@ -name: deploy-book +name: on-push on: push: branches: - master - #- main tags: - '*' - + pull_request: + branches: + - master + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -31,7 +33,7 @@ jobs: - name: Install Conda Environment uses: mamba-org/provision-with-micromamba@v13 with: - environment-file: binder/environment.yml + environment-file: environment.yml cache-env: true cache-env-key: ubuntu-latest-3.10 From 8b8db40effc5ab0b4ddbd1149f98338827f44db8 Mon Sep 17 00:00:00 2001 From: Emma Marshall <55526386+e-marshall@users.noreply.github.com> Date: Sun, 18 Feb 2024 12:55:43 -0700 Subject: [PATCH 6/7] Update on-push.yml update env yml path --- .github/workflows/on-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index d150e55..a8e3ce7 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -33,7 +33,7 @@ jobs: - name: Install Conda Environment uses: mamba-org/provision-with-micromamba@v13 with: - environment-file: environment.yml + environment-file: /binder/environment.yml cache-env: true cache-env-key: ubuntu-latest-3.10 From ab563a78a2f85026ca5c47a1a4b7fb12c4280e3c Mon Sep 17 00:00:00 2001 From: Emma Marshall <55526386+e-marshall@users.noreply.github.com> Date: Sun, 18 Feb 2024 13:05:54 -0700 Subject: [PATCH 7/7] Update on-push.yml add permissions enable codespell --- .github/workflows/on-push.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index a8e3ce7..b5b6519 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -1,4 +1,9 @@ name: on-push +permissions: + pull-requests: write + issues: write + repository-projects: write + on: push: @@ -26,8 +31,8 @@ jobs: - name: Checkout uses: actions/checkout@v3 - #- name: Codespell with annotations - # uses: codespell-project/actions-codespell@v1.0 + - name: Codespell with annotations + uses: codespell-project/actions-codespell@v1.0 - name: Install Conda Environment