Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove vagrant stuff, pointing towards WSL2 #6

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/deploy-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,4 +31,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/_build/html
publish_branch: gh-pages
publish_branch: gh-pages
61 changes: 28 additions & 33 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10/10 support always having a workflow_dispatch option for rebuilding on the fly, saves so many spurious commits.

# 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/
20 changes: 2 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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)
10 changes: 0 additions & 10 deletions Vagrantfile

This file was deleted.

18 changes: 0 additions & 18 deletions vagrant/bootstrap.sh

This file was deleted.

Loading