-
Notifications
You must be signed in to change notification settings - Fork 12
47 lines (39 loc) · 1.22 KB
/
backend-staging-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Deploy backend to staging
on:
push:
branches:
- master
paths-ignore:
- "web/**"
- "CHANGELOG.md"
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@v4
with:
fetch-depth: 0 # fetch history for all branches and tags
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- 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: |
pip install build
python -m 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 }}