1.6.1 update (#94) #76
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
name: Build Pages | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build_pages: | |
name: Build Pages | |
runs-on: ubuntu-latest | |
container: ghcr.io/oggm/oggm:latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Fix Git-Protection | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Install Dependencies | |
run: | | |
${PIP} install --upgrade pip setuptools wheel | |
${PIP} install -r requirements.txt | |
${PIP} uninstall -y progressbar2 | |
- name: Build Book | |
run: | | |
jupyter-book build . | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-output | |
path: _build/ | |
- name: Push Book | |
if: github.event_name != 'pull_request' | |
run: | | |
${PIP} install ghp-import | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@bots.github.com" | |
git fetch origin gh-pages | |
ghp-import -n -p -f -b gh-pages -m "Update docs from ${GITHUB_SHA}" _build/html |