diff --git a/.github/workflows/deploy-book.yml b/.github/workflows/deploy-book.yml index 5502eea..6814778 100644 --- a/.github/workflows/deploy-book.yml +++ b/.github/workflows/deploy-book.yml @@ -13,11 +13,10 @@ jobs: deploy-book: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 with: environment-file: environment.yml - auto-activate-base: false activate-environment: arcdocs-jb # Build the book @@ -32,4 +31,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./book/_build/html - publish_branch: gh-pages \ No newline at end of file + publish_branch: gh-pages diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index bfdef4a..336bba4 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -1,33 +1,28 @@ -# copied from https://jupyterbook.org/publish/gh-pages.html?highlight=github%20pages - -name: test-build - -# Only run this when a PR suggests changes to main branch -on: - pull_request: - branches: - - main - -# This job installs dependencies and builds the book -jobs: - deploy-book: - runs-on: ${{ matrix.os }} - strategy: - # test build on multiple OS - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 - with: - environment-file: environment.yml - auto-activate-base: false - activate-environment: arcdocs-jb - - # Build the book - - name: Build the book - shell: bash -l {0} - run: | - conda activate arcdocs-jb - jupyter-book build ./book/ - +# copied from https://jupyterbook.org/publish/gh-pages.html?highlight=github%20pages + +name: test-build + +# Only run this when a PR suggests changes to main branch +on: + pull_request: + branches: + - main + workflow_dispatch: + +# This job installs dependencies and builds the book +jobs: + deploy-book: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 + with: + environment-file: environment.yml + activate-environment: arcdocs-jb + + # Build the book + - name: Build the book + shell: bash -l {0} + run: | + conda activate arcdocs-jb + jupyter-book build ./book/ diff --git a/README.md b/README.md index 5669696..0619cb3 100644 --- a/README.md +++ b/README.md @@ -18,25 +18,9 @@ To build the html content locally you can use the `jupyter-book` command line to # navigate to the repository root $ cd template-jb-docs # sometimes worth running jupyter-book clean book/ to remove old files +# build the book $ jupyter-book build book/ ``` ### Windows -Jupyterbook now supports [Windows](https://jupyterbook.org/en/stable/advanced/windows.html) although the steps for configuring a development environment using Vagrant are available below: - -#### Set up a development environment using Vagrant - -To aid with this we have created a `Vagrantfile` that can allow Windows users who have a virtualisation provider installed (such as [VirtualBox](https://www.virtualbox.org/)) and [Vagrant](https://www.vagrantup.com/) installed to create a headless virtual Linux machine that will build the jupyter book. You can do this with the following steps once you've installed a virtualisation provider and vagrant: -``` -# within git-bash or powershell -$ cd template-jb-docs -$ vagrant up - -# to rebuild the site after changes with the vagrant box running -$ vagrant reload --provision - -# don't forget to destroy the box when you're done -$ vagrant destroy -``` - -This will build the jupyter-book html files on your Windows file system (by navigating via /vagrant) so your local build will still persist after you've destroyed your vagrant box. \ No newline at end of file +Jupyterbook is no longer supported on [Windows](https://jupyterbook.org/en/stable/advanced/windows.html) (since Windows 10). The [official documentation](https://jupyterbook.org/en/stable/advanced/windows.html) suggests using [Windows Subsystem for Linux 2 (WSL2).](https://learn.microsoft.com/en-us/windows/wsl/install) diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 8938962..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure("2") do |config| - config.vm.box = "hashicorp/bionic64" - - config.vm.hostname = "arcdocsSite" - - config.vm.provision :shell, path: "vagrant/bootstrap.sh" -end diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh deleted file mode 100644 index d26373c..0000000 --- a/vagrant/bootstrap.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -apt-get update -apt-get install git -wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh -chmod +x miniconda.sh -./miniconda.sh -b -p /home/vagrant/miniconda -# ensures conda loaded in shell -echo "source /home/vagrant/miniconda/etc/profile.d/conda.sh" >> /home/vagrant/.bashrc -source /home/vagrant/miniconda/etc/profile.d/conda.sh -chown -R vagrant:vagrant /home/vagrant/miniconda - -# create environment and build book -cd /vagrant -conda env create -f environment.yml -conda activate arcdocs-jb -jb clean book/ -jb build book/ \ No newline at end of file