Skip to content

Commit 1f06fe2

Browse files
committed
Update configuration files for Jupyter Book v 2.x deployment and project settings
1 parent a83b411 commit 1f06fe2

3 files changed

Lines changed: 116 additions & 17 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This file was created automatically with `jupyter-book init --gh-pages` 🪄 💚
2+
# Ensure your GitHub Pages settings for this repository are set to deploy with **GitHub Actions**.
3+
4+
name: Jupyter Book (via myst) GitHub Pages Deploy
5+
on:
6+
push:
7+
# Runs on pushes targeting the default branch
8+
branches: [main]
9+
env:
10+
# `BASE_URL` determines, relative to the root of the domain, the URL that your site is served from.
11+
# E.g., if your site lives at `https://mydomain.org/myproject`, set `BASE_URL=/myproject`.
12+
# If, instead, your site lives at the root of the domain, at `https://mydomain.org`, set `BASE_URL=''`.
13+
BASE_URL: /${{ github.event.repository.name }}
14+
15+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+
concurrency:
23+
group: 'pages'
24+
cancel-in-progress: false
25+
jobs:
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v3
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: 18.x
38+
- name: Install Jupyter Book (via myst)
39+
run: npm install -g jupyter-book
40+
- name: Build HTML Assets
41+
run: jupyter-book build --html
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: './_build/html'
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

_config.yml

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,58 @@
11
# Book settings
2-
title : Neural Data Science in Python
3-
author : Aaron J Newman
4-
copyright : 2020-23. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Unported License
5-
logo : images/NESC3505_icon.png
2+
title: Neural Data Science in Python
3+
author: Aaron J Newman
4+
copyright: "2020-23. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Unported License"
5+
logo: images/NESC3505_icon.png
66

7-
latex:
8-
latex_documents:
9-
targetname: book.tex
7+
# Force all builds to be HTML only
8+
exclude_patterns: [_build, Thumbs.db, .DS_Store, "**.ipynb_checkpoints"]
109

10+
# Parse and render settings
11+
parse:
12+
myst_enable_extensions:
13+
- colon_fence
14+
- dollarmath
15+
- linkify
16+
- substitution
17+
- tasklist
18+
myst_url_schemes: [mailto, http, https]
19+
20+
# Bibliography settings
1121
bibtex_bibfiles:
12-
- references.bib
22+
- references.bib
1323

24+
# Repository settings
1425
repository:
15-
url : "https://github.com/neural-data-science/NESC_3505_textbook"
26+
url: https://github.com/neural-data-science/NESC_3505_textbook
27+
path_to_book: ""
28+
branch: master
1629

30+
# HTML settings
1731
html:
18-
favicon : "images/NESC3505_favicon.png" # A path to a favicon image
19-
navbar_footer_text : 'Powered by <a href="https://jupyterbook.org">Jupyter Book</a>' # Will be displayed underneath the left navbar.
20-
google_analytics_id : G-1SNTM6T50K # A GA id that can be used to track book views.
21-
home_page_in_navbar : true # Whether to include your home page in the left Navigation Bar
22-
use_edit_page_button : false # Whether to add an "edit this page" button to pages. If `true`, repository information in repository: must be filled in
23-
baseurl : "http://neuraldatascience.io" # The base URL where your book will be hosted. Used for creating image previews and social links. e.g.: https://mypage.com/mybook/
24-
use_repository_button : true
25-
use_issues_button : true
32+
favicon: images/NESC3505_favicon.png
33+
use_edit_page_button: false
34+
use_repository_button: true
35+
use_issues_button: true
36+
home_page_in_navbar: true
37+
baseurl: http://neuraldatascience.io
38+
google_analytics_id: G-1SNTM6T50K
39+
extra_footer: |
40+
<p>Powered by <a href="https://jupyterbook.org">Jupyter Book</a></p>
2641
42+
# Execution settings
2743
execute:
2844
execute_notebooks: auto
2945
allow_errors: true
3046
timeout: -1
3147

48+
# Only build files in the TOC
3249
only_build_toc_files: true
50+
51+
# Sphinx settings
52+
sphinx:
53+
config:
54+
html_theme_options:
55+
repository_url: https://github.com/neural-data-science/NESC_3505_textbook
56+
use_repository_button: true
57+
use_issues_button: true
3358

myst.yml.backup

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 1
2+
project:
3+
title: Neural Data Science in Python
4+
description: An open educational resource for neural data science
5+
authors:
6+
- name: Aaron J Newman
7+
keywords:
8+
- neuroscience
9+
- data science
10+
- python
11+
github: https://github.com/neural-data-science/NESC_3505_textbook
12+
license:
13+
content: CC-BY-NC-SA-4.0
14+
bibliography:
15+
- references.bib
16+
17+
site:
18+
template: book-theme
19+
title: Neural Data Science in Python
20+
options:
21+
logo: images/NESC3505_icon.png
22+
favicon: images/NESC3505_favicon.png
23+
nav: []
24+
actions:
25+
- title: GitHub
26+
url: https://github.com/neural-data-science/NESC_3505_textbook

0 commit comments

Comments
 (0)