Update build.yml #8
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 and Push | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm install | |
- name: Format project | |
run: npm run fmt | |
- name: Build project | |
run: npm run build | |
- name: Commit and push changes | |
continue-on-error: true | |
run: | | |
git config --global user.name "ArnavK-09" | |
git config --global user.email "arnavkaushal09@gmail.com" | |
git add . | |
git commit -m "Build & Format" | |
git push | |
- name: Continue | |
run: exit 0 |