Skip to content

Commit

Permalink
add jupyter-book
Browse files Browse the repository at this point in the history
  • Loading branch information
yymao committed Mar 1, 2024
1 parent a2bbf21 commit e4c41a1
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy-book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: deploy-book

on:
push:
branches:
- master
- u/yymao/jupyter-book

jobs:
deploy-book:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install dependencies
run: |
pip install wheel
pip install jupyter-book
- name: Build the book
run: jupyter-book build --all .
- name: Push to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
23 changes: 23 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Book settings
# Learn more at https://jupyterbook.org/customize/config.html

title: LSST DESC DC2 Analysis
author: LSST DESC
copyright: "2024"
logo: logo.png
exclude_patterns: [".github"]

execute:
execute_notebooks: off

html:
use_issues_button: true
baseurl: https://lsstdesc.github.io/DC2-analysis

launch_buttons:
notebook_interface : jupyterlab
jupyterhub_url : "https://jupyter.nersc.gov" # The URL of the JupyterHub (e.g., https://datahub.berkeley.edu)

repository:
url: https://github.com/LSSTDESC/DC2-analysis
branch: master
18 changes: 18 additions & 0 deletions _toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Table of contents
# Learn more at https://jupyterbook.org/customize/toc.html

format: jb-book
root: README
title: Home
parts:
- caption: Tutorials
chapters:
- glob: tutorials/*.ipynb

- caption: Validation
chapters:
- glob: validation/*.ipynb

- caption: Contributed
chapters:
- glob: contributed/*.ipynb
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e4c41a1

Please sign in to comment.