From e9accf555749c2f662911915b8c5e38d06358655 Mon Sep 17 00:00:00 2001 From: Jacob Nesbitt Date: Mon, 18 Apr 2022 17:34:26 -0400 Subject: [PATCH] Push to heroku directly in update-release-branch.yml --- .../workflows/backend-production-deploy.yml | 19 ------------------- .github/workflows/update-release-branch.yml | 8 +++++++- 2 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/backend-production-deploy.yml diff --git a/.github/workflows/backend-production-deploy.yml b/.github/workflows/backend-production-deploy.yml deleted file mode 100644 index 8e4111c96..000000000 --- a/.github/workflows/backend-production-deploy.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Trigger production deploy of backend server on push to release - -on: - push: - branches: - - release - paths-ignore: - - "web/**" - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: akhileshns/heroku-deploy@v3.12.12 - with: - heroku_api_key: ${{secrets.HEROKU_API_KEY}} - heroku_app_name: "dandi-api" - heroku_email: ${{secrets.HEROKU_EMAIL}} diff --git a/.github/workflows/update-release-branch.yml b/.github/workflows/update-release-branch.yml index 5e6ed9bb9..3387c2cc4 100644 --- a/.github/workflows/update-release-branch.yml +++ b/.github/workflows/update-release-branch.yml @@ -13,9 +13,15 @@ jobs: fetch-depth: 0 # fetch history for all branches and tags token: ${{ secrets.GH_TOKEN }} # use PAT with permissions to push to master ref: release - + - name: Reset release branch run: | git reset --hard ${{ github.ref }} git push --force origin release + - name: Deploy to Heroku + - uses: akhileshns/heroku-deploy@v3.12.12 + with: + heroku_api_key: ${{secrets.HEROKU_API_KEY}} + heroku_app_name: "dandi-api" + heroku_email: ${{secrets.HEROKU_EMAIL}}