title: How to add a gitignore folder to github actions?
body: <p>I have a Django Project and created a dev branch. In my .gitignore file I have the &quot;media&quot; folder. My project looks like this:</p>
  <pre><code>- Django Project/
      - app1/
      - app2/
      - media/
          - profile_pics/
          - default.jpg
      - .gitignore
  </code></pre>
  <p>In my gitignore I added <code>media</code>.</p>
  <p>I've been trying to add github actions, so I created this ci.yml</p>
  <pre><code>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
  </code></pre>
  <p>When I push the repo I received this message from Github Actions:</p>
  <pre><code>FileNotFoundError: [Errno 2] No such file or directory: '****/media/default.jpg'
  </code></pre>
  <p>What is the best way to deal with this?</p>
  <p>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 <code>media</code> in deployment.</p>