Skip to content

Merge pull request #7 from islasimpson/main #14

Merge pull request #7 from islasimpson/main

Merge pull request #7 from islasimpson/main #14

name: JupyterBook
#name: Build and Publish JupyterBook to GitHub Pages
#
on:
[push]
jobs:
build:
if: github.repository == 'NCAR/CESM-Tutorial-AGU'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Python dependencies
run: |
sudo apt-get install python3-pip
pip install ghp-import
pip install jupyter-book
PATH="${PATH}:${HOME}/.local/bin"
- name: Build book HTML
run: |
jupyter-book build .
- name: Push _build/html to gh-pages
run: |
sudo chown -R $(whoami):$(whoami) .
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_ACTOR"
git remote set-url origin "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY"
ls -lrt
ghp-import -n -p -f _build/html