Skip to content

Commit

Permalink
Set up git-lfs and track relevant files (#315)
Browse files Browse the repository at this point in the history
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
  • Loading branch information
pavithraes and pmeier authored Feb 14, 2024
1 parent b7c5cff commit ba755d0
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Track all images through git-lfs
*.webp filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
# but keep the brand images as regular images
docs/assets/brand/logo-**/* !filter !diff !merge binary
13 changes: 13 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@ build:
python: "mambaforge-22.9"
jobs:
post_checkout:
# Check out the full depth for setuptools-scm
- git fetch --unshallow || true
# Check out git-lfs files
# See https://docs.readthedocs.io/en/stable/build-customization.html#support-git-lfs-large-file-storage
- wget
https://github.com/git-lfs/git-lfs/releases/download/v3.4.0/git-lfs-linux-amd64-v3.4.0.tar.gz
- tar xvfz git-lfs-linux-amd64-v3.4.0.tar.gz
- ln -s git-lfs-3.4.0/git-lfs git-lfs
- git config filter.lfs.process "`pwd`/git-lfs filter-process"
- git config filter.lfs.smudge "`pwd`/git-lfs smudge -- %f"
- git config filter.lfs.clean "`pwd`/git-lfs clean -- %f"
- ./git-lfs install
- ./git-lfs fetch
- ./git-lfs checkout

mkdocs:
configuration: mkdocs.yml
Expand Down
23 changes: 23 additions & 0 deletions docs/community/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,29 @@ mkdocs serve

This serves the docs website at [http://127.0.0.1:8000](http://127.0.0.1:8000).

### View, add, or update images

Ragna tracks most image files with [`git-lfs`](https://git-lfs.com).

As a first-time user of `git-lfs`, set it up with:

```bash
git lfs install
```

To pull all image files to your local repository, run:

```bash
git lfs pull
```

All new or updated images will be tracked by `git-lfs`. To verify the files being
tracked, run:

```bash
git lfs ls-files
```

## Contribution best practices

- Before opening new issues, go through the tracker to ensure there aren't any previous
Expand Down
Binary file modified docs/how-tos/images/ragna-config-wizard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
dependencies:
- python =3.9
- pip
- git-lfs
- pip:
- python-dotenv
- boto3
Expand Down

0 comments on commit ba755d0

Please sign in to comment.