Skip to content

Commit

Permalink
Merge pull request #1075 from dandi/1054-hotfix
Browse files Browse the repository at this point in the history
Deploy to heroku with Heroku CLI directly
  • Loading branch information
jjnesbitt committed Apr 29, 2022
2 parents 8749e08 + 4ee926b commit 1aa8bb4
Show file tree
Hide file tree
Showing 2 changed files with 31 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 @@ -11,9 +11,21 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.12.12
- uses: actions/checkout@v3
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "dandi-api-staging"
heroku_email: ${{secrets.HEROKU_EMAIL}}
fetch-depth: 0 # fetch history for all branches and tags

- 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: 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 }}
20 changes: 14 additions & 6 deletions .github/workflows/update-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,17 @@ 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: 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 1aa8bb4

Please sign in to comment.