Skip to content

Commit

Permalink
chore: set up GH pages for reports (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlFontal committed Oct 4, 2022
1 parent 466e6e6 commit 2476011
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: deploy

on:
# Trigger the workflow on push to main branch
push:
branches:
- main

# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
build-and-deploy-book:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
- uses: actions/checkout@v2

# Install dependencies
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
# Copy README into build folder to include it as intro
- name: Copy README
run: |
cp README.md notebooks/
# Build the book
- name: Build the book
run: |
jupyter-book build reports
- name: Clean notebook outputs for nicer HTML render
run: curl -s -S https://gist.githubusercontent.com/AlFontal/896e180f9f7772c4825067591f34c94b/raw > clean_notebook.py;
python clean_notebook.py --path reports

# Deploy the book's HTML to gh-pages branch
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: reports/_build/html
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ data/air_pollution/stations/doc/TM20140000.txt
data/air_pollution/stations/doc/TM20130000.txt
data/air_pollution/stations/doc/TM20120000.txt
data/air_pollution/stations/doc/TM20110000.txt
data/doc/images/*

# Japanese e-Stat site API key
.appID
data/shapefiles/administrative_boundaries/municipality_shapes.cpg
data/shapefiles/administrative_boundaries/municipality_shapes.dbf
data/shapefiles/administrative_boundaries/municipality_shapes.prj
data/shapefiles/administrative_boundaries/municipality_shapes.shp
data/shapefiles/administrative_boundaries/municipality_shapes.shx
data/shapefiles/administrative_boundaries/prefecture_shapes.cpg
data/shapefiles/administrative_boundaries/prefecture_shapes.dbf
data/shapefiles/administrative_boundaries/prefecture_shapes.prj
data/shapefiles/administrative_boundaries/prefecture_shapes.shp
data/shapefiles/administrative_boundaries/prefecture_shapes.shx
Binary file modified data/air_pollution/stations/doc/stations_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions reports/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# yaml-language-server: $schema=./_config.yaml
#######################################################################################
# A default configuration that will be loaded for all jupyter books
# See the documentation for help and more options:
# https://jupyterbook.org/customize/config.html

#######################################################################################
# Book settings
title : KD and Tokyo's air sources # The title of the book. Will be placed in the left navbar.
author : Alejandro Fontal # The author of the book
copyright : "2022" # Copyright year to be placed in the footer
logo : images/logo.png # A path to the book logo

execute:
execute_notebooks: "off"

repository:
url: https://github.com/AlFontal/vasculitis2022-conference
branch: main
html:
use_repository_button: true
use_issues_button: true
favicon: images/favicon.ico
baseurl: 'https://alfontal.github.io/vasculitis2022-conference'
comments:
utterances:
repo: 'AlFontal/vasculitis2022-conference'
extra_navbar: |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div>
<hr>
<a href="https://helical-itn.eu/">
<img src="https://helical-itn.eu/wp-content/uploads/2020/01/cropped-HELICAL_logo-3.png" width=200px>
</a>
<p></p>
<a href="https://www.isglobal.org/en/-/clima-y-salud">
<img src="https://www.isglobal.org/isglobal-new-theme/assets/images/isglobal/logo-isglobal-en.png" width=200px>
</a>
<hr>
<a href="https://www.linkedin.com/in/alfontal/">
<img class="profile" src="https://avatars.githubusercontent.com/u/10958332?s=400&amp;u=51edd1406d2af0c2f1723a0bf8f111d48a1b7fe7&amp;v=4" alt="Alejandro Fontal">
<p style="text-align: center; font-size:16px"><b>Alejandro Fontal</b></p>
</a>
<a href="https://github.com/AlFontal" class="fa fa-github" style="font-size: 25px;"></a>
<a href="https://www.linkedin.com/in/alfontal/" class="fa fa-linkedin" style="font-size: 25px;"></a></a>
<a href="https://twitter.com/alefontal" class="fa fa-twitter" style="font-size: 25px;"></a></a>
<a href="mailto:alejandro.fontal.92@gmail.com" class="fa fa-envelope" style="font-size: 25px;"></a></a>
</div>
google_analytics_id: G-TC2X861BC8

bibtex_bibfiles: references.bib

sphinx:
config:
html_js_files:
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js
bibtex_reference_style: author_year

html_baseurl: 'https://alfontal.github.io/vasculitis2022-conference/'

extra_extensions:
- sphinx_sitemap

7 changes: 7 additions & 0 deletions reports/_toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
format: jb-article
root: README
sections:
- file: prefecture_weighted_averages
title: From station to prefectural data


8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bs4
html5lib
jupyter-book==v0.12.3
matplotlib
numpy
ghp-import
sphinxcontrib-bibtex==2.2.0
sphinx-sitemap

0 comments on commit 2476011

Please sign in to comment.