diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..dbe8a72 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,51 @@ +name: Continuous Deployment +on: + push: + branches: + - main + - production + + pull_request: [] + + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Test + run: docker-compose run --rm app sh -c "python manage.py test" + + lint: + name: Lint + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Lint + run: docker-compose run --rm app sh -c "flake8" + + deploy-staging: + name: Deploy to Staging + runs-on: ubuntu-20.04 + needs: [test, lint] + if: github.ref == 'refs/heads/main' + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Deploy to Staging + run: echo "Deploy to STAGING code here" + + + deploy-prod: + name: Deploy to Production + runs-on: ubuntu-20.04 + needs: [test, lint] + if: github.ref == 'refs/heads/production' + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Deploy to Prod + run: echo "Deploy to PRODUCTION code here" diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6ee269c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "workbench.colorCustomizations": { + "activityBar.background": "#233120", + "titleBar.activeBackground": "#31452D", + "titleBar.activeForeground": "#FAFBF9" + } +} \ No newline at end of file diff --git a/app/home/views.py b/app/home/views.py index ea1f535..3311ff9 100644 --- a/app/home/views.py +++ b/app/home/views.py @@ -3,4 +3,5 @@ def index(request): """Render index page.""" + # return None return render(request, 'home/index.html') diff --git a/requirements.txt b/requirements.txt index cb4ae7b..028a636 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ Django>=3.1.7,<3.2 uWSGI>=2.0.19,<2.1 - flake8>=3.9.0,<3.10