diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..415ae4b --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,22 @@ +name: Prettier + +on: + pull_request: + push: + branches: [main] + +jobs: + prettier: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + # 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_message: "style: format code with prettier" + prettier_options: "--write styles/**/*.css" diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..ce5bd52 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +/styles/codeberg/ +/styles/reddit/ diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..9a8be12 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "overrides": [ + { + "files": "styles/**/*.css", + "options": { + "parser": "less" + } + } + ] +}