Skip to content

Commit

Permalink
fix: update Doxygen deployment trigger and add linter workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterLaplace committed Nov 7, 2024
1 parent 9b5a497 commit 91f383d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_doxygen_page.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Doxygen GitHub Pages Deploy Action
on:
release:
types: [published]
types: [released]

jobs:
generate:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Linter GitHub Action

on:
push:
branches-ignore:
- 'ga-ignore-**'
- 'gh-pages'

jobs:
lint_code:
name: Lint with clang-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install clang-format
run: sudo apt-get install -y clang-format

- name: Run clang-format
run: |
git ls-files -z "*.cpp" "*.hpp" | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
find . -iname '*.hpp' -o -iname '*.cpp' | xargs clang-format -i
- name: Set up Git and Push changes
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "style: apply linter" || true
git push || true

0 comments on commit 91f383d

Please sign in to comment.