diff options
| author | Bradley Taunt <bt@btxx.org> | 2026-09-10 10:36:42 -0400 |
|---|---|---|
| committer | Bradley Taunt <git@btxx.org> | 2026-09-10 10:40:46 -0400 |
| commit | 3c7806a5d6d566b72e4fd1671ae8dc5c55748b79 (patch) | |
| tree | 565a2d985ad9cc46e4ee70e5a7c687a174e335dd /.github/workflows/format.yml | |
| parent | 645d830fac1f35bb07f00ab2f2c1fef6c48ec4a8 (diff) | |
Actions workflow for formatting sites
Diffstat (limited to '.github/workflows/format.yml')
| -rw-r--r-- | .github/workflows/format.yml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..9bbe54e --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,23 @@ +name: Format sites +on: + push: + branches: + - master +permissions: + contents: write +jobs: + format-sites: + if: github.actor != 'github-actions[bot]' && !contains(github.event.head_commit.author.name, 'Formatting Bot') + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Format and push + run: | + git config user.email "bot@1mb.club" + git config user.name "Formatting Bot" + yq --inplace 'sort_by(.domain)' _data/sites.yml + sed -i '1!s/- domain:/\n- domain:/g' _data/sites.yml + git diff --quiet || (git commit -am "Fix formatting" && git push) |
