Resident Date Error (#167) #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy backend to Heroku dev environment | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "backend/**" | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set Heroku login credentials | |
run: | | |
cat > ~/.netrc <<EOF | |
machine api.heroku.com | |
login $HEROKU_EMAIL | |
password $HEROKU_API_KEY | |
machine git.heroku.com | |
login $HEROKU_EMAIL | |
password $HEROKU_API_KEY | |
EOF | |
env: | |
HEROKU_API_KEY: "${{ secrets.HEROKU_API_KEY }}" | |
HEROKU_EMAIL: "${{ secrets.HEROKU_EMAIL }}" | |
- name: Add Heroku git remote | |
run: heroku git:remote --app $HEROKU_APP_NAME | |
env: | |
HEROKU_APP_NAME: "${{ secrets.HEROKU_APP_NAME }}" | |
- name: Set Heroku config vars | |
run: | | |
heroku config:set FIREBASE_WEB_API_KEY="${{ secrets.FIREBASE_WEB_API_KEY }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_REQUEST_URI="${{ secrets.FIREBASE_REQUEST_URI }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_STORAGE_DEFAULT_BUCKET="${{ secrets.FIREBASE_STORAGE_DEFAULT_BUCKET }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_PROJECT_ID="${{ secrets.DEV_PROJECT_ID }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_SVC_ACCOUNT_PRIVATE_KEY_ID="${{ secrets.FIREBASE_SVC_ACCOUNT_PRIVATE_KEY_ID }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_SVC_ACCOUNT_PRIVATE_KEY="${{ secrets.FIREBASE_SVC_ACCOUNT_PRIVATE_KEY }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_SVC_ACCOUNT_CLIENT_EMAIL="${{ secrets.FIREBASE_SVC_ACCOUNT_CLIENT_EMAIL }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_SVC_ACCOUNT_CLIENT_ID="${{ secrets.FIREBASE_SVC_ACCOUNT_CLIENT_ID }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_SVC_ACCOUNT_AUTH_URI="${{ secrets.FIREBASE_SVC_ACCOUNT_AUTH_URI }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_SVC_ACCOUNT_TOKEN_URI="${{ secrets.FIREBASE_SVC_ACCOUNT_TOKEN_URI }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_SVC_ACCOUNT_AUTH_PROVIDER_X509_CERT_URL="${{ secrets.FIREBASE_SVC_ACCOUNT_AUTH_PROVIDER_X509_CERT_URL }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FIREBASE_SVC_ACCOUNT_CLIENT_X509_CERT_URL="${{ secrets.FIREBASE_SVC_ACCOUNT_CLIENT_X509_CERT_URL }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set MAILER_USER="${{ secrets.MAILER_USER }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set MAILER_CLIENT_ID="${{ secrets.MAILER_CLIENT_ID }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set MAILER_CLIENT_SECRET="${{ secrets.MAILER_CLIENT_SECRET }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set MAILER_REFRESH_TOKEN="${{ secrets.MAILER_REFRESH_TOKEN }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set PREVIEW_DEPLOY=true -a $HEROKU_APP_NAME && \ | |
heroku config:set FLASK_CONFIG="${{ secrets.FLASK_CONFIG }}" -a $HEROKU_APP_NAME && \ | |
heroku config:set FLASK_APP=app -a $HEROKU_APP_NAME | |
env: | |
HEROKU_APP_NAME: "${{ secrets.HEROKU_APP_NAME }}" | |
- name: Push to Heroku | |
run: git push heroku `git subtree split --prefix backend`:refs/heads/main --force |