Skip to content

Merge pull request #2671 from dandi/how-to-cite-tab #820

Merge pull request #2671 from dandi/how-to-cite-tab

Merge pull request #2671 from dandi/how-to-cite-tab #820

name: Deploy backend to staging
on:
push:
branches:
- master
paths-ignore:
- "web/**"
- "CHANGELOG.md"
permissions:
contents: read
concurrency:
# If this workflow is already running, cancel it to avoid a scenario
# where the older run finishes *after* the newer run and overwrites
# the deployment with an older version of the app.
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
deploy:
name: Deploy to Heroku
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # fetch history for all branches and tags
- name: Install uv
uses: astral-sh/setup-uv@v7
- 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: |
uv build --sdist
- name: Create Heroku Build
run: heroku builds:create -a dandi-api-staging --source-tar dist/*.tar.gz
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_EMAIL: ${{ secrets.HEROKU_EMAIL }}