Skip to content

Commit

Permalink
Merge pull request #981 from gchq/fix/rtd-images
Browse files Browse the repository at this point in the history
ci(docs): fix LFS in ReadTheDocs build
  • Loading branch information
tp832944 authored Feb 20, 2025
2 parents 69add99 + 56ee205 commit cc77d8e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@ build:
# Note that we use 3.12 here rather than 3.13 to avoid spurious Sphinx errors
# about not being able to link to `pathlib._locals.Path`.
python: "3.12"
jobs:
# Fix LFS images. See documentation at:
# https://docs.readthedocs.com/platform/stable/build-customization.html#support-git-lfs-large-file-storage
post_checkout:
# Download and uncompress the binary
# https://git-lfs.github.com/
- wget https://github.com/git-lfs/git-lfs/releases/download/v3.6.1/git-lfs-linux-amd64-v3.6.1.tar.gz
- tar xvfz git-lfs-linux-amd64-v3.6.1.tar.gz # cspell:disable-line
# Modify LFS config paths to point where git-lfs binary was downloaded
- git config filter.lfs.process "`pwd`/git-lfs-3.6.1/git-lfs filter-process"
- git config filter.lfs.smudge "`pwd`/git-lfs-3.6.1/git-lfs smudge -- %f"
- git config filter.lfs.clean "`pwd`/git-lfs-3.6.1/git-lfs clean -- %f"
# Make LFS available in current repository
- ./git-lfs-3.6.1/git-lfs install
# Download content from remote
- ./git-lfs-3.6.1/git-lfs fetch
# Make local files to have the real content on them
- ./git-lfs-3.6.1/git-lfs checkout

sphinx:
configuration: documentation/source/conf.py
Expand Down

0 comments on commit cc77d8e

Please sign in to comment.