Skip to content

Prettier workflow

Prettier workflow #5

Workflow file for this run

name: Prettier & Lint
on:
pull_request:
types: [opened, reopened, synchronize]
branches: main
env:
NODE_VERSION: "18.13.0"
jobs:
lint:
name: Run code formatter & linter
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install
run: npm install
- name: Prettier
run: npx prettier . --write
- name: Commit
run: |
git config --global user.email "[email protected]"
git config --global user.name Shea Dougherty-Gill
git commit -a -m "Prettier formatting ${{ vars.IGNORE_DEPLOY }}"
git pull
git push origin HEAD:${{ github.head_ref }}
- name: Lint
run: npm run ng lint