gitea_heroku/deploy.sh

21 lines
481 B
Bash
Raw Normal View History

2024-10-23 18:23:51 +02:00
#!/bin/bash
# Create git repository if it doesn't exist
if [ ! -d ".git" ]; then
git init
fi
# Create a new Heroku app
appName = $(heroku create --stack heroku-24 --region eu --json | jq -r '.name')
echo $appName > heroku-app.txt
# Add Heroku Postgres add-on
heroku addons:create heroku-postgresql:essential-0 --app s464863-gitea
# Push to Heroku
git add .
git commit -m "Deploy to Heroku"
git push heroku main
# Open the app in the browser
heroku open --app s464863-gitea