This file contains hidden or 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: Add Heroku remote | |
run: heroku git:remote --app=${{ env.HEROKU_APP_NAME }} |
This file contains hidden or 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: Copy environment variables to Heroku app | |
if: github.event.action == 'opened' | |
run: | | |
heroku config --shell --app=my-development-app > .env | |
cat .env | tr '\n' ' ' | xargs heroku config:set --app=${{ env.HEROKU_APP_NAME }} |
This file contains hidden or 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: Add Heroku app to pipeline | |
if: github.event.action == 'opened' | |
run: heroku pipelines:add my-pipeline --app=${{ env.HEROKU_APP_NAME }} --stage=development |
This file contains hidden or 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: Create Heroku app | |
if: github.event.action == 'opened' | |
run: heroku apps:create ${{ env.HEROKU_APP_NAME }} |
This file contains hidden or 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: Login to Heroku | |
uses: akhileshns/[email protected] | |
with: | |
heroku_api_key: ${{ secrets.HEROKU_API_KEY }} | |
heroku_email: [email protected] | |
heroku_app_name: ${{ env.HEROKU_APP_NAME }} | |
justlogin: true |
This file contains hidden or 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: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} |
This file contains hidden or 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
jobs: | |
heroku-pull-request: | |
runs-on: ubuntu-latest | |
env: | |
HEROKU_APP_NAME: my-app-pr-${{ github.event.number }} | |
steps: | |
# ... |
This file contains hidden or 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 Pull Request | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, closed] |
This file contains hidden or 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 Pull Request | |
on: pull_request |
This file contains hidden or 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
# shut down redis-server (if applicable) | |
REDIS_SERVER_PID_FILE=/tmp/redis-server.pid | |
(kill $(cat $REDIS_SERVER_PID_FILE) 2>&1) >/dev/null | |
sleep 0.1 | |
# start redis-server | |
nohup redis-server redis.conf >/dev/null 2>&1 & | |
sleep 0.1 | |
echo $! > $REDIS_SERVER_PID_FILE |