From 5b60e9a83c1c96146885e2f72d407f9a6da5d8e8 Mon Sep 17 00:00:00 2001
From: winston <hey@winston.sh>
Date: Mon, 24 Jul 2023 19:59:49 +0200
Subject: [PATCH] ci: add crate-ci/typos (#129)

Co-authored-by: sgoudham <sgoudham@gmail.com>
---
 .github/workflows/typos.yml | 21 +++++++++++++++++++++
 .typos.toml                 | 12 ++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 .github/workflows/typos.yml
 create mode 100644 .typos.toml

diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml
new file mode 100644
index 0000000..95a4bca
--- /dev/null
+++ b/.github/workflows/typos.yml
@@ -0,0 +1,21 @@
+name: Typos
+on:
+  pull_request:
+  push:
+    branches: [main]
+
+jobs:
+  run:
+    name: Spell Check
+    runs-on: ubuntu-latest
+
+    steps:
+    - name: Checkout Actions Repository
+      uses: actions/checkout@v3
+
+    - uses: crate-ci/typos@master
+
+    # We don't want this check to fail on `main` but continue to fail on PRs
+    - name: Successfully Exit When Branch 'main'
+      if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
+      run: "exit 0"
diff --git a/.typos.toml b/.typos.toml
new file mode 100644
index 0000000..853f6ae
--- /dev/null
+++ b/.typos.toml
@@ -0,0 +1,12 @@
+[default]
+locale = "en-us"
+
+# maintainer names
+[default.extend-words]
+Ren = "Ren"
+
+[type.css]
+extend-ignore-re = [
+  # generated classnames from css modules
+  '_[\w\d]+',
+]