I have a Django Project and created a dev branch. In my .gitignore file I have the "media" folder. My project looks like this:
- Django Project/
- app1/
- app2/
- media/
- profile_pics/
- default.jpg
- .gitignore
In my gitignore I added media.
I've been trying to add github actions, so I created this ci.yml
name: Testing
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
python manage.py test
When I push the repo I received this message from Github Actions:
FileNotFoundError: [Errno 2] No such file or directory: '****/media/default.jpg'
What is the best way to deal with this?
I could use git add media -f but I do not know if then this file would be in my repo and when I merge it with main and deploy it I would have that folder and overwrites the media in deployment.