Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Set up GA build of HTML on commit
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |