prettier test #13
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: Prettier Auto-Format | |
on: | |
push: | |
branches: | |
- feat/add-prettier-format | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out Repository | |
uses: actions/checkout@v2 | |
- name: Install Prettier | |
run: npm install prettier --global | |
- name: Format Files | |
run: | | |
prettier --write . | |
- name: Commit Changes | |
run: | | |
git config --global user.name "Whisker17" | |
git config --global user.email "[email protected]" | |
git add . | |
git commit -m "Auto-format code with Prettier [skip ci]" | |
- name: Push Changes | |
run: | | |
branch_name=${{ github.ref }} | |
git push origin $branch_name |