This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
ci: updates #7
Workflow file for this run
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
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
branches: | |
- main | |
- master | |
workflow_dispatch: | |
name: Render | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
JULIA_NUM_THREADS: "auto" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
# To install LaTeX to build PDF book | |
tinytex: false # we don't need latex | |
# uncomment below and fill to pin a version | |
# version: SPECIFIC-QUARTO-VERSION-HERE | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
cache: 'pip' | |
- name: Install Jupyter | |
run: pip install jupyter jupyter-cache | |
- name: Install Python project | |
run: pip install -r requirements.txt | |
- run: echo "PYTHON=$(which python)" >> $GITHUB_ENV | |
- name: Set up Julia | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: "1" | |
- name: Cache Julia | |
uses: julia-actions/cache@v1 | |
- name: Instantiate Julia project | |
run: julia --color=yes --project -e 'using Pkg; Pkg.instantiate()' | |
- name: Render Quarto Project | |
uses: quarto-dev/quarto-actions/render@v2 | |
with: | |
to: html # If set, it will be equivalent to `quarto render --to html` | |
path: index.qmd | |
- name: Make preview available | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: html-preview | |
path: ./index.html |