Skip to content

Commit

Permalink
[Add] markdown formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGalek committed Jan 5, 2025
1 parent 3977f22 commit 5368113
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/docs-formatter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Format Documentation

on:
schedule:
- cron: '0 * * * *'
push:
workflow_dispatch:

jobs:
generate-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-node@v4
with:
node-version: 20
- run: |
npm install markdown-table-formatter -g
markdown-table-formatter ./*.md
markdown-table-formatter ./**/*.md
markdown-table-formatter ./docs/*.md
markdown-table-formatter ./docs/**/*.md
- name: Commit and push changes
run: |
if git diff --quiet ./; then
echo "Žádné změny, nic k commitování."
else
git add .
git commit -m "[Fix] markdown format"
git pull --rebase
git push origin HEAD:main
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5368113

Please sign in to comment.