title: Django SECRET_KEY setting must not be empty with github workflow
body: <p>I have a GitHub workflow for Django and when it gets to migrating the database it gives the error</p>
  
  <pre><code>django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
  </code></pre>
  
  <p>the secret key is stored in a <code>.env</code> file and loaded with </p>
  
  <pre class="lang-py prettyprint-override"><code>from dotenv import load_dotenv
  load_dotenv()
  from pathlib import Path
  env_path = Path('.') / '.env'
  load_dotenv(dotenv_path=env_path)
  SECRET_KEY = os.getenv("secret_key")
  </code></pre>
  
  <p>Here is the file tree</p>
  
  <pre><code>C:.
  |   db.sqlite3
  |   manage.py
  |
  \---djangosite
      |   .env
      |   asgi.py
      |   settings.py
      |   urls.py
      |   wsgi.py
      |   __init__.py
      |
      \---__pycache__
          ...
  </code></pre>
  
  <p>This is the manage.py, it is the regular django one with the load .env code from settings.py</p>
  
  <pre class="lang-py prettyprint-override"><code>#!/usr/bin/env python
  """Django's command-line utility for administrative tasks."""
  from dotenv import load_dotenv
  load_dotenv()
  from pathlib import Path
  env_path = Path('.') / '.env'
  load_dotenv(dotenv_path=env_path)
  import os
  import sys
  
  
  def main():
      os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangosite.settings')
      try:
          from django.core.management import execute_from_command_line
      except ImportError as exc:
          raise ImportError(
              "Couldn't import Django. Are you sure it's installed and "
              "available on your PYTHONPATH environment variable? Did you "
              "forget to activate a virtual environment?"
          ) from exc
      execute_from_command_line(sys.argv)
  
  
  if __name__ == '__main__':
      main()
  
  </code></pre>
  
  <p>when I run <code>manage.py</code> on my PC it loads the key and runs the server, but GitHub gives the error above. 
  How do I stop this error from happening?</p>