-
Notifications
You must be signed in to change notification settings - Fork 18
41 lines (39 loc) · 1.14 KB
/
build-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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