CD-Redeploy #53
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: CD-Redeploy | |
on: | |
workflow_dispatch: | |
permissions: read-all | |
jobs: | |
redeploy_render: | |
name: Redeploy API to Production | |
if: ${{ github.repository == 'sws2apps/sws2apps-api' && github.ref == 'refs/heads/main' }} | |
environment: | |
name: Prod.env | |
url: https://api.sws2apps.com | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Heroku CLI | |
run: | | |
curl https://cli-assets.heroku.com/install.sh | sh | |
- name: Checkout for release preparation | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
with: | |
ref: main | |
persist-credentials: false | |
- name: Deploy API to Heroku | |
uses: akhileshns/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520 | |
with: | |
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | |
heroku_app_name: sws2apps | |
heroku_email: ${{secrets.HEROKU_EMAIL}} |