Skip to content

Merge pull request #41 from nipraxis/enh/assert-vs-raise #199

Merge pull request #41 from nipraxis/enh/assert-vs-raise

Merge pull request #41 from nipraxis/enh/assert-vs-raise #199

Workflow file for this run

name: build-and-deploy
# Only run this when the master branch changes
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/cache@v3
with:
path: /var/lib/apt
key: apt-cache-v2
restore-keys: |
apt-cache-v2
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
curl \
bzip2 \
ca-certificates \
dvipng
- uses: actions/checkout@v3
# Install dependencies
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Pip dependencies
run: |
pip install "pip==23.0.1"
pip install -r build_requirements.txt
# Build the page
- name: Build the book
run: |
make html
- uses: actions/upload-artifact@v3
if: failure()
with:
name: error_logs
path: ./_build/html/reports
# Push the book's HTML to github-pages
- name: GitHub Pages action
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html