Skip to content

Update actions ubuntu version #613

Update actions ubuntu version

Update actions ubuntu version #613

Workflow file for this run

# Based on https://github.com/executablebooks/github-action-demo
name: build
on:
pull_request:
push:
branches: [main]
tags:
- '*'
# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/[email protected]
# Install dependencies
- name: Install Graphviz
run: |
sudo apt-get install graphviz {lib,}graphviz-dev
- name: Set up Python 3.11
uses: actions/[email protected]
with:
python-version: "3.11"
cache: "pip"
- name: Install python dependencies
run: |
pip install --upgrade pip wheel
pip install -r requirements-CI.txt
- name: Install R support
run: |
# We need to remove R to pull in a version that's compatible with CRAN, weirdly.
sudo apt-get update
sudo apt-get remove r-base-core
sudo apt-get install r-cran-reticulate r-cran-pbdzmq r-cran-uuid r-cran-ape
sudo R -e 'install.packages("IRkernel")'
R -e 'IRkernel::installspec()'
# Build the book
- name: Build the book
run: ./build.sh
- name: Copy files for users to run tutorials
run: |
cp ./requirements.txt ./_build/html/.
cp -r data ./_build/html/examples
ls data > ./_build/html/examples/files.txt
# Push the book's HTML to github-pages
- name: GitHub Pages action
if: github.ref == 'refs/heads/main'
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
- name: Trigger docs site rebuild
if: github.ref == 'refs/heads/main'
run: |
curl -X POST https://api.github.com/repos/tskit-dev/tskit-site/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u AdminBot-tskit:${{ secrets.ADMINBOT_TOKEN }} \
--data '{"event_type":"build-docs"}'