Skip to content

Update main.yml

Update main.yml #3

Workflow file for this run

name: Node.js CI
on:
push:
branches: ["main"]
jobs:
build-react:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: setup git config
run: |
git config user.name "Sadanand Pai"
git config user.email "[email protected]"
- name: setup react deployment
run: |
cd react
npm install
rm -rf dist
npm run build
git add dist -f
git diff --staged --quiet || (git commit -m "react build files - github action" && git push)
cd ..
build-angular:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: setup git config
run: |
git config user.name "Sadanand Pai"
git config user.email "[email protected]"
- name: setup angular deployment
run: |
cd angular
npm install
rm -rf dist
npm run build-prod
git add dist -f
git diff --staged --quiet || (git commit -m "angular build files - github action" && git push)
cd ..