Skip to content

Merge pull request #60 from fromedwin/develop #148

Merge pull request #60 from fromedwin/develop

Merge pull request #60 from fromedwin/develop #148

Workflow file for this run

name: Django CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.12]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r src/requirements.txt
- name: Run Migrate
run: |
python src/manage.py migrate
- name: Install tailwind
run: |
python src/manage.py tailwind install
python src/manage.py tailwind build
- name: "Deploy to production - clever cloud"
if: github.ref == 'refs/heads/main'
uses: 47ng/[email protected]
with:
setEnv: |
APP_FOLDER=src
AWS_S3_ENDPOINT_URL=${{ secrets.AWS_S3_ENDPOINT_URL }}
AWS_S3_CUSTOM_DOMAIN=${{ secrets.AWS_S3_CUSTOM_DOMAIN }}
AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_STORAGE_BUCKET_NAME=fromedwin
CC_PYTHON_BACKEND=gunicorn
CC_PYTHON_MANAGE_TASKS=tailwind install, tailwind build, migrate, collectstatic --no-input
CC_PYTHON_MODULE=core.wsgi:application
CC_PYTHON_VERSION=3.12
CELERY_BROKER_URL=${{ secrets.CELERY_BROKER_URL }}
CONTACT_EMAIL=${{ secrets.CONTACT_EMAIL }}
DATABASE_URL=${{ secrets.DATABASE_URL }}
DOMAIN=fromedwin.com
EMAIL_HOST=${{ secrets.EMAIL_HOST }}
EMAIL_PORT=${{ secrets.EMAIL_PORT }}
EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }}
EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }}
EMAIL_USE_TLS=${{ secrets.EMAIL_USE_TLS }}
ENABLE_GZIP_COMPRESSION=true
FORCE_HTTPS=True
LIGHTHOUSE_SCRAPE_INTERVAL_MINUTES=1440
PORT=80
SECRET_KEY=${{ secrets.SECRET_KEY }}
SENTRY_ENVIRONMENT=production
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
STATIC_FILES_PATH=staticfiles/
STATIC_URL_PREFIX=/static
STORAGE=S3
appID: app_871f4083-51f1-4065-9aa5-fc9019059569
env:
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}