Skip to content

Commit

Permalink
Deploy to heroku with Heroku CLI directly
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnesbitt committed Apr 29, 2022
1 parent 8749e08 commit 03c6f11
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/backend-staging-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,20 @@ jobs:
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-staging"
heroku_email: ${{secrets.HEROKU_EMAIL}}

- name: Install Heroku CLI
run: curl https://cli-assets.heroku.com/install.sh | sh

- name: Install builds plugin
run: heroku plugins:install heroku-builds

- name: Build app into tarball
run: |
git fetch --prune --unshallow --tags
python setup.py sdist --formats=gztar
- name: Create Heroku Build
run: heroku builds:create -a dandi-api-staging --source-tar=dist/$(python setup.py --fullname).tar.gz
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_EMAIL: ${{ secrets.HEROKU_EMAIL }}
22 changes: 16 additions & 6 deletions .github/workflows/update-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,19 @@ jobs:
fetch-depth: 0 # fetch history for all branches and tags
ref: 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}}
- name: Install Heroku CLI
run: curl https://cli-assets.heroku.com/install.sh | sh

- name: Install builds plugin
run: heroku plugins:install heroku-builds

- name: Build app into tarball
run: |
git fetch --prune --unshallow --tags
python setup.py sdist --formats=gztar
- name: Create Heroku Build
run: heroku builds:create -a dandi-api --source-tar=dist/$(python setup.py --fullname).tar.gz
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_EMAIL: ${{ secrets.HEROKU_EMAIL }}

0 comments on commit 03c6f11

Please sign in to comment.