fix: workflow trigger on main branch PR merge (#20) #36
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: Build | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
types: | |
- opened | |
- synchronize # Run the workflow when new commits are pushed to the PR | |
- reopened | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
env: | |
REACT_APP_CHATBOT_API_URL: ${{ vars.REACT_APP_CHATBOT_API_URL }} | |
run: npm run build |