Skip to content

CD

CD #288

Workflow file for this run

name: CD
on:
workflow_dispatch:
permissions: read-all
jobs:
deploy:
name: Deploy 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: Checkout for release preparation
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: main
persist-credentials: false
- name: Use Node.js LTS version
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: lts/Iron
- name: Install dependencies
run: npm ci
- name: Semantic Release
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release
- 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}}