Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set up GA build of HTML on commit
  • Loading branch information
darribas committed Sep 19, 2020
1 parent 9fdf9fa commit 3705ed4
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build_website.yml
@@ -0,0 +1,41 @@
# Copied from https://github.com/urbangrammarai/data_processing/blob/master/.github/workflows/build_book.yml
name: Build Jupyter book
on:
push:
branches:
- master
jobs:
build-html-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Setup Miniconda
uses: goanpeca/setup-miniconda@v1
with:
auto-update-conda: true
auto-activate-base: false
miniconda-version: "latest"
python-version: 3.7
environment-file: ga_environment.yml
activate-environment: book

- name: Build HTML
shell: bash -l {0}
continue-on-error: false
run: |
make html
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs
git commit -m "Build Jupyter book" -a --allow-empty
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
12 changes: 12 additions & 0 deletions infrastructure/ga_environment.yml
@@ -0,0 +1,12 @@
# Environment file to build website on each commit
# For end-users, the gds_env (darribas.org/gds_env) is recommended
name: book
channels:
- default
- conda-forge
dependencies:
- python=3.7.*
- sphinx=2.4.4
- pip
- pip:
- jupyter-book==0.7.3

0 comments on commit 3705ed4

Please sign in to comment.