Skip to content

Commit

Permalink
meta: deploy to Heroku on every companion commit (#4367)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mifi committed Mar 21, 2023
1 parent ef1a945 commit 32002ff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/companion-deploy.yml
Expand Up @@ -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
19 changes: 0 additions & 19 deletions .github/workflows/release.yml
Expand Up @@ -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

0 comments on commit 32002ff

Please sign in to comment.