Dev #56
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
# this workflow partially copied from | |
# https://github.com/TransformerLensOrg/TransformerLens/blob/main/.github/workflows/checks.yml | |
name: make docs | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build-docs: | |
# When running on a PR, this just checks we can build the docs without errors | |
# When running on merge to main, it builds the docs and then another job deploys them | |
name: 'Build Docs' | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') || contains(github.head_ref, 'docs') | |
steps: | |
- name: Install pandoc | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: pandoc | |
version: '3.3' | |
- name: Check pandoc version | |
run: pandoc --version | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: set up uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Install package and deps | |
run: make dep | |
- name: Build Docs | |
run: make docs |