mirror of
https://github.com/BillyOutlast/posthog.com.git
synced 2026-02-04 19:31:21 +01:00
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Non-Blocking Basic Checks
|
|
|
|
on:
|
|
- pull_request
|
|
|
|
jobs:
|
|
standard_checks:
|
|
name: Spelling
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ github.head_ref }}
|
|
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Install codespell with pip
|
|
run: |
|
|
python -m pip install -U pip
|
|
python -m pip install git+https://github.com/yakkomajuri/codespell.git
|
|
|
|
# Replaced by JS checks (remove when sure JS checks are working)
|
|
# - name: Install requests with pip
|
|
# run: |
|
|
# python -m pip install requests
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git fetch origin master:master
|
|
git config user.name PostHog Bot
|
|
git config user.email hey@posthog.com
|
|
|
|
- name: Fix typos
|
|
run: |
|
|
codespell ./contents -w -S "./contents/images/*,./contents/docs/_media/*" -q 8 -I ./.codespellignore
|
|
git add .
|
|
[ "$(git status -s)" = "" ] && exit 0 || git commit -m "Fix typos"
|
|
|
|
- name: Push changes
|
|
run: |
|
|
git push
|