-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a59aad
commit 45c6fe1
Showing
7 changed files
with
178 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: build-and-deploy-book | ||
|
||
# Trigger the workflow on push to main branch and PRs | ||
on: [push, pull_request] | ||
# This job installs dependencies, builds the book, and deploys the html | ||
jobs: | ||
build-and-deploy-book: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: [3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get PR number | ||
run: echo "Your PR is ${PR}" | ||
env: | ||
PR: ${{ github.event.pull_request.number }} | ||
- name: 📦 Cache Conda Packages | ||
uses: actions/cache@v2 | ||
env: | ||
# Increase this value to reset cache if etc/example-environment.yml has not changed | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('conda-linux-64.lock') }} | ||
- name: 🐍 Set up Conda environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: false | ||
activate-environment: DGM2lines | ||
environment-file: conda-linux-64.lock | ||
- name: 👀 Check Conda environment | ||
shell: bash -l {0} | ||
run: | | ||
conda info | ||
conda list | ||
- name: 📦 Cache Notebooks | ||
uses: actions/cache@v2 | ||
with: | ||
path: _build/.jupyter_cache | ||
key: notebook_cache-${{hashFiles('_toc.yml', '_config.yml', 'environment.yml') }} | ||
- name: 📖 Build the book | ||
shell: bash -l {0} | ||
run: | | ||
mkdir -p _notebook_cache | ||
jupyter-book build . | ||
- name: 📖 Show logs from the book build | ||
shell: bash -l {0} | ||
run: | | ||
find _build/html -name "*.log" -print -exec cat {} \; | ||
- name: 🚀 Deploy to GitHub Pages | ||
if: github.ref == 'refs/heads/main' | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: _build/html | ||
keep_files: false | ||
force_orphan: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Book settings | ||
# Learn more at https://jupyterbook.org/customize/config.html | ||
|
||
# this title does not seem to work, refer to sphinx.config.html_theme_options.logo.text | ||
title: Data Gallery | ||
author: The M<sup>2</sup>LInES Community | ||
logo: assets/newlogo.png | ||
|
||
exclude_patterns: ['env/*', '_build/*'] | ||
only_build_toc_files: true | ||
# Force re-execution of notebooks on each build. | ||
# See https://jupyterbook.org/content/execute.html | ||
execute: | ||
execute_notebooks: force | ||
timeout: 1800 | ||
exclude_patterns: ['*old_notebooks/*'] | ||
|
||
parse: | ||
myst_enable_extensions: | ||
- amsmath | ||
- dollarmath | ||
|
||
# Define the name of the latex output file for PDF builds | ||
latex: | ||
latex_documents: | ||
targetname: book.tex | ||
|
||
# Add a bibtex file so that we can create citations | ||
bibtex_bibfiles: | ||
- references.bib | ||
|
||
# set to author_year format | ||
sphinx: | ||
html4_writer: | ||
{ | ||
"citation_show_urls": False, | ||
"citation_references": "full", | ||
"external_links": False, | ||
} | ||
config: | ||
bibtex_reference_style: author_year | ||
nb_merge_streams: true | ||
html_theme_options: | ||
# title of the notebook | ||
logo: | ||
text: "Data Gallery" | ||
|
||
# Information about where the book exists on the web | ||
repository: | ||
url: https://github.com/m2lines/data-gallery # Online location of your book | ||
branch: main # Which branch of the repository should be used when creating links (optional) | ||
|
||
# Add GitHub buttons to your book | ||
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository | ||
html: | ||
use_issues_button: true | ||
use_repository_button: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Table of contents | ||
# Learn more at https://jupyterbook.org/customize/toc.html | ||
|
||
format: jb-book | ||
root: intro | ||
parts: | ||
- caption: Basic Concepts | ||
chapters: | ||
- file: notebooks/xarray_intro.ipynb |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Introduction | ||
|
||
: 🚧 Under Development 🚧 | ||
|
||
Check back soon! |
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.