Skip to content

Commit

Permalink
added make-docs recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
mivanit committed Aug 29, 2024
1 parent cd2f1c8 commit 7c225c6
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/make-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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: Install
run: poetry install

- name: Unit tests, for coverage
run: make unit COV=1

- name: Build Docs
run: make docs

0 comments on commit 7c225c6

Please sign in to comment.