From 210e4e4c33394dd5ec2090346f5d3682e6d96541 Mon Sep 17 00:00:00 2001 From: Nathaniel Date: Mon, 27 May 2024 16:22:02 +0300 Subject: [PATCH] Update django.yml --- .github/workflows/django.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 55dd80b..dc37045 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -35,14 +35,29 @@ jobs: needs: [build] steps: - uses: actions/checkout@v3 - - name: Test + + # Backend Tests and Deployment + - name: Test Backend run: | cd backend - echo "Running tests..." - - name: Deploy - # Only run this step if the branch is main + echo "Running backend tests..." + + - name: Deploy Backend + if: github.ref == 'refs/heads/main' + env: + deploy_url: ${{ secrets.BACKEND_RENDER_DEPLOY_HOOK_URL }} + run: | + curl "$deploy_url" + + # Frontend Tests and Deployment + - name: Test Frontend + run: | + cd frontend + echo "Running frontend tests..." + + - name: Deploy Frontend if: github.ref == 'refs/heads/main' env: - deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }} + deploy_url: ${{ secrets.FRONTEND_RENDER_DEPLOY_HOOK_URL }} run: | curl "$deploy_url"