add:prettier config install #1
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: Auto Format and Commit | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- closed | |
jobs: | |
format-and-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: npm install | |
- name: Run format:fix | |
run: npm run format:fix | |
- name: Commit changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action Bot" | |
git add . | |
git commit -m "Auto-format and commit changes" -s | |
git push |