From 2ce39d31362d4fdd1bdba878b867f92f68ad8938 Mon Sep 17 00:00:00 2001 From: Paul Craig Date: Mon, 18 Nov 2024 20:20:50 -0500 Subject: [PATCH] Clean up the main.yml deployment file Also run the deployment for real --- .github/workflows/django_gcp_migrate.yml | 2 +- .github/workflows/main.yml | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/django_gcp_migrate.yml b/.github/workflows/django_gcp_migrate.yml index 1a672107..93374efa 100644 --- a/.github/workflows/django_gcp_migrate.yml +++ b/.github/workflows/django_gcp_migrate.yml @@ -61,4 +61,4 @@ jobs: - name: Run migration env: DATABASE_URL: ${{ secrets.DATABASE_URL }} - run: poetry run python manage.py migrate --plan + run: poetry run python manage.py migrate diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0cbad0a6..d55c92db 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,15 +11,6 @@ on: - main jobs: - debug: - runs-on: ubuntu-latest - steps: - - name: Debug event - run: | - echo "Event name: ${{ github.event_name }}" - echo "ref_name: ${{ github.ref_name }}" - echo "ref: ${{ github.ref }}" - ci: uses: ./.github/workflows/django_ci.yml # Call the CI workflow with: @@ -27,8 +18,7 @@ jobs: secrets: inherit migrate: - # if: github.event_name == 'push' && github.ref_name == 'main' - if: github.event_name == 'pull_request' && github.ref_name == '52/merge' + if: github.event_name == 'push' && github.ref_name == 'main' needs: ci uses: ./.github/workflows/django_gcp_migrate.yml secrets: @@ -37,8 +27,8 @@ jobs: GCP_IAM_SA_CREDENTIALS: ${{ secrets.GCP_IAM_SA_CREDENTIALS }} deploy: - if: github.event_name == 'pull_request' && github.ref_name == '52/merge' - needs: ci + if: github.event_name == 'push' && github.ref_name == 'main' + needs: migrate uses: ./.github/workflows/django_gcp_deploy.yml # Call the Deploy workflow with: github_sha: ${{ github.sha }}