Skip to content

🍲 Thread chat (#1120) #234

🍲 Thread chat (#1120)

🍲 Thread chat (#1120) #234

Workflow file for this run

name: Deploy to Prod
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
# Run yarn build
- name: run yarn build
uses: actions/[email protected]
with:
node-version: "16"
check-latest: true
- name: Install and Build
env:
# set CI to false because warnings are treated as errors if CI=true
# manually set react env here because NODE_ENV=production on build
CI: false
REACT_APP_FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
REACT_APP_ENV: production
run: yarn install && yarn run build
- name: save build artifacts
uses: actions/[email protected]
with:
name: frontend-build
path: ${{ github.workspace }}/frontend/build
retention-days: 1
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/[email protected]
- name: Downloading build artifacts
uses: actions/download-artifact@v3
with:
name: frontend-build
path: ${{ github.workspace }}/frontend/artifacts
- name: Deploy to Heroku
uses: AkhileshNS/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "mentee-h4i"
heroku_email: "[email protected]"
branch: main