26 lines
764 B
YAML
26 lines
764 B
YAML
name: Prettier
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
prettier:
|
|
name: Format Code
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
token: ${{ github.ref == 'refs/heads/main' && secrets.USERSTYLES_TOKEN || github.token }}
|
|
# Make sure the actual branch is checked out when running on pull requests
|
|
ref: ${{ github.head_ref }}
|
|
- name: Run Prettier
|
|
uses: creyD/prettier_action@v4.3
|
|
with:
|
|
commit_options: "--author 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'"
|
|
commit_message: "style: format code with prettier"
|
|
prettier_options: "--write styles/**/*.css"
|
|
prettier_version: "2.8.4"
|