Skip to content
This repository was archived by the owner on Nov 20, 2021. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 51 additions & 26 deletions actions/publish.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,76 @@
name: Publish to neurolibre.com
name: deploy-book

on:
push:
branches:
- master
# If your git repository has the Jupyter Book within some-subfolder next to
# unrelated files, you can make this run only if a file within that specific
# folder has been modified.
#
# paths:
# - content/**
tags:
- "pub-v*"
- "v*"
env:
PUB_NAME: ${{ github.event.repository.name }}

jobs:
dispatch2Website:

deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Install dependencies
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install dependencies
run: |
pip install -r build-requirements.txt

# Build the page
- name: Build the book
run: |
jupyter-book build content/

# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./content/_build/html
commit_message: 🤖 Deploy Jupyter Book

publish:

name: Publish to website
needs: [deploy-book]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Checkout publication repository
uses: actions/checkout@v2
- name: Convert yaml to json (publication info)

- name: Convert yaml to json (publication info)
uses: fabasoad/yaml-json-xml-converter-action@v1.0.0
id: yaml2json
with:
path: '${{ env.PUB_NAME }}.yml'
from: 'yaml'
to: 'json'

- name: Resolve release tag
run: |
echo ::set-env name=PUB_TAG::$(echo ${GITHUB_REF/refs\/tags\//})
- name: Dispatch event to neurolibre.com

- name: Dispatch event to neurolibre.com
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.PAT }}
event-type: publish
repository: roboneurotest/website-test
client-payload: '{"pub_info": ${{ steps.yaml2json.outputs.data }}, "pub_name": "${{ env.PUB_NAME }}", "pub_tag": "${{ env.PUB_TAG }}"}'
buildJupyterBook:
runs-on: ubuntu-latest
steps:
- name: Chekout repo
uses: actions/checkout@v2
- name: Build site HTML
run: |
docker pull agahkarakuzu/jbuild
mkdir _site
chmod 777 -R ./_site
docker run --rm --security-opt label:disable \
-v ${{ github.workspace }}:/srv/jekyll \
agahkarakuzu/jbuild
rsync -a $GITHUB_WORKSPACE/_site/ $GITHUB_WORKSPACE/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.PAT }}
publish_dir: ./
commit_message: 🤖 Deploy Jupyter Book
client-payload: '{"pub_info": ${{ steps.yaml2json.outputs.data }}, "pub_name": "${{ env.PUB_NAME }}", "pub_tag": "${{ env.PUB_TAG }}"}'
3 changes: 3 additions & 0 deletions build-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-r requirements.txt
jupyter-book
jupytext[myst]
7 changes: 7 additions & 0 deletions editorial/allowed_list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"allowed": [
"mathieuboudreau",
"TommyBoshkovski",
"emdupre"
]
}
5 changes: 0 additions & 5 deletions editorial/blacklist.json

This file was deleted.

10 changes: 5 additions & 5 deletions editorial/neurolibre_roles.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"welcome_team": ["mathieuboudreau",
"agahkarakuzu",
"ltetrel",
"pbellec"
"agahkarakuzu",
"ltetrel",
"pbellec"
],
"reviewers": [{"handle":"agahkarakuzu","expertise":["qmri","software"],"affiliation":"NeuroPoly Lab, Polytechnique Montreal"},
{"handle":"mathieuboudreau","expertise":["qmri","software"],"affiliation":"Montreal Heart Institute"},
{"handle":"emdupre","expertise":["fmri","software"],"affiliation":"Montreal Neurological Institute, McGill"},
{"handle":"ltetrel","expertise":["software"],"affiliation":"SIMEXP Lab, University of Montreal"},
{"handle":"pbellec","expertise":["software","neuroimaging"],"affiliation":"SIMEXP Lab, University of Montreal"}
]
{"handle":"pbellec","expertise":["software","neuroimaging"],"affiliation":"SIMEXP Lab, University of Montreal"}
]
}
77 changes: 77 additions & 0 deletions file-types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"Jupyter Notebook": {
"format": ".ipynb",
"icon": "https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/i/de920fda-40bd-43e8-9ed3-339bb970c3c4/dd8pdzs-cbc64bcd-86d9-4e22-a415-820e63c4e959.png",
"icon_size": 30,
"plural": "s",
"abs_match": false
},
"Dockerfile": {
"format": "Dockerfile",
"icon": "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
"icon_size": 30,
"plural": "s",
"abs_match": false
},
"JupyterBook config file": {
"format": [
"_config.yml",
"toc.yml",
"_data/toc.yml"
],
"icon": "https://jupyterbook.org/_static/logo.png",
"icon_size": 30,
"plural": "s",
"abs_match": true
},
"Pip Requirements": {
"format": "requirements.txt",
"icon": "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/267_Python_logo-512.png",
"icon_size": 30,
"plural": "",
"abs_match": true
},
"Other config file": {
"format": [
"environment.yml",
"Pipfile",
"Pipfile.lock",
"setup.py",
"Project.toml",
"REQUIRE",
"install.R",
"apt.txt",
"DESCRIPTION",
"manifest.yml",
"postBuild",
"start",
"runtime.txt",
"default.nix"
],
"icon": "https://avatars3.githubusercontent.com/u/13699731?s=280&v=4",
"icon_size": 30,
"plural": "s",
"abs_match": true
},
"Readme": {
"format": "README.md",
"icon": "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/273_Readme_logo-512.png",
"icon_size": 30,
"plural": "",
"abs_match": true
},
"License": {
"format": "LICENSE",
"icon": "https://cdn0.iconfinder.com/data/icons/customicondesign-office7-shadow-png/256/License-manager.png",
"icon_size": 30,
"plural": "",
"abs_match": true
},
"Repo2Data": {
"format": "data_requirement.json",
"icon": "https://cdn4.iconfinder.com/data/icons/cloud-computing-2/500/cloud-arrow-down-512.png",
"icon_size": 30,
"plural": "",
"abs_match": true
}
}
4 changes: 2 additions & 2 deletions integration/google/OAuth.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"runtimeVersion": "V8",
"oauthScopes": [
"https://www.googleapis.com/auth/gmail.send",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.addons.current.action.compose",
"https://www.googleapis.com/auth/script.external_request"
]
]
}
Loading