PCF-314 Add link to the PerfCompare Matrix channel on home page (#602) #5
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: Heroku Deploy | |
on: | |
push: | |
branches: | |
- 'staging' | |
- 'master' | |
- 'mocking' | |
jobs: | |
deploy: | |
name: Deploy Heroku | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
with: | |
# this means that it is a full history clone, not a shallow one | |
# heroku push fails with a shallow clone | |
fetch-depth: 0 | |
- name: Set up git credentials | |
run: | | |
# doesn't matter the credentials here since we're not committing anything | |
# but git will complain if these are not set | |
git config --global user.email '[email protected]' | |
git config --global user.name 'MozMEAO Bot' | |
- name: Set up Heroku CLI | |
env: | |
API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
EMAIL: '[email protected]' | |
run: | | |
cat > ~/.netrc <<EOF | |
machine api.heroku.com | |
login ${EMAIL} | |
password ${API_KEY} | |
machine git.heroku.com | |
login ${EMAIL} | |
password ${API_KEY} | |
EOF | |
- name: Deploy | |
run: | | |
set -ex | |
# the call to xargs here just strips whitespace | |
export APP_NAME="perfcompare-${GITHUB_REF_NAME}" | |
heroku git:remote --app "$APP_NAME" | |
git push --force heroku "${GITHUB_REF_NAME}:master" |