Update main.yml #3
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: 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 .. |