Skip to content

Commit

Permalink
Update to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulMagos committed Nov 10, 2023
1 parent 8f06db5 commit eb5803d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 27 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/label.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
container: ubuntu
steps:
- uses: actions/checkout@v2
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_GITHUB_TOKEN }}
with:
source-directory: '.'
destination-github-username: 'PaulMagos'
destination-repository-name: 'smartreports-backend'
user-email: paulmagos@icloud.com
commit-message: See ORIGIN_COMMIT from $GITHUB_REF
target-branch: main
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
__pycache__/
*.py[cod]
*$py.class
smartreport/static
smartreport_app/migrations
# C extensions
*.so
Expand Down Expand Up @@ -161,4 +160,7 @@ cython_debug/
#.idea/

# node_modules
node_modules
node_modules

# Static files
staticfiles_build
1 change: 1 addition & 0 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smartreport.settings')
os.environ.setdefault('DEBUG', "False" if f'{os.environ.get("DEBUG")}'.lower() == 'false' else "True")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
Expand Down
8 changes: 5 additions & 3 deletions smartreport/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
https://docs.djangoproject.com/en/4.2/ref/settings/
"""
import os
from os.path import join as join, dirname
from pathlib import Path
from dotenv import load_dotenv

dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dotenv_path)
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

Expand All @@ -22,8 +26,6 @@
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "django-insecure-uji3*2a6x#!jcvjy9ogvgoo5h6jb=$au1w)1*u1yk!6$+z#obj"

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = [
"127.0.0.1",
Expand Down Expand Up @@ -93,7 +95,7 @@
# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases

if DEBUG:
if os.environ.get("DEBUG"):
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
Expand Down

0 comments on commit eb5803d

Please sign in to comment.