Skip to content

Commit

Permalink
Host documentation on GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Sep 9, 2023
1 parent 138c011 commit cecbdf9
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Documentation

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
doc:
name: Execute and build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install -r requirements.txt
- run: jupyter book build . -W
- uses: actions/upload-pages-artifact@v1
if: always()
with:
path: ./_build/html

gh-pages:
name: Upload to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
needs:
- doc
permissions:
pages: write
id-token: write
runs-on: ubuntu-22.04
steps:
- id: deployment
uses: actions/deploy-pages@v2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.ipynb_checkpoints/
_build/
data/
19 changes: 19 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
title: Solutions to STRON2020 HaSP School
author: Participants of the STRONG2020 HaSP School
copyright: "2023"

execute:
allow_errors: false
execute_notebooks: cache
timeout: 600

only_build_toc_files: true

repository:
url: https://github.com/ComPWA/strong2020-salamanca
path_to_book: .
branch: main

sphinx:
config:
nb_execution_show_tb: True
4 changes: 4 additions & 0 deletions _toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
format: jb-book
root: README
chapters:
- file: lecture2
8 changes: 8 additions & 0 deletions lecture2.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "3e84775e",
"metadata": {},
"source": [
"# Lecture 2 - Kinematics"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ numpy
particle

# Developer tools
jupyter-book
jupyterlab
jupyterlab-code-formatter
pre-commit

0 comments on commit cecbdf9

Please sign in to comment.