From 32002ffe78160a4eda5bcefd02d96a1f5fdada24 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Tue, 21 Mar 2023 22:06:32 +0800 Subject: [PATCH] meta: deploy to Heroku on every companion commit (#4367) Instead of deploying on each release, deploy to Heroku on every commit that is touching a companion file (except release commits, but that's fine as the release commit should contain doc-only changes). This is to increase our chance of catching bugs before releases, and would ensure that Uppy.io examples are using the edge. --- .github/workflows/companion-deploy.yml | 17 +++++++++++++++++ .github/workflows/release.yml | 19 ------------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/companion-deploy.yml b/.github/workflows/companion-deploy.yml index c2d676def8..a8c06b6d5b 100644 --- a/.github/workflows/companion-deploy.yml +++ b/.github/workflows/companion-deploy.yml @@ -65,3 +65,20 @@ jobs: file: Dockerfile tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} + + heroku: + name: Heroku + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v3 + - name: Alter dockerfile + run: | + sed -i 's/^EXPOSE 3020$/EXPOSE $PORT/g' Dockerfile + - name: Deploy to heroku + uses: akhileshns/heroku-deploy@v3.12.12 + with: + heroku_api_key: ${{secrets.HEROKU_API_KEY}} + heroku_app_name: companion-demo + heroku_email: ${{secrets.HEROKU_EMAIL}} + usedocker: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index edfa74e560..3f3d25d963 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -142,22 +142,3 @@ jobs: file: Dockerfile tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} - - heroku: - name: Heroku - needs: release - if: ${{ needs.release.outputs.companionWasReleased }} - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - name: Alter dockerfile - run: | - sed -i 's/^EXPOSE 3020$/EXPOSE $PORT/g' Dockerfile - - name: Deploy to heroku - uses: akhileshns/heroku-deploy@v3.12.12 - with: - heroku_api_key: ${{secrets.HEROKU_API_KEY}} - heroku_app_name: companion-demo - heroku_email: ${{secrets.HEROKU_EMAIL}} - usedocker: true