chore: format docs guide with </CodeTabs> #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format Markdown | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- 'content/**/*.md' | |
jobs: | |
format-markdown: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Install Prettier | |
run: npm install prettier | |
- name: Run Prettier | |
run: npx prettier --write "content/**/*.md" --ignore-path .prettierignore | |
- name: Commit changes | |
run: | | |
git config user.name "GitHub Action" | |
git config user.email "[email protected]" | |
git add -A | |
git commit -m "chore: format content markdown files with Prettier" || echo "No changes to commit" | |
- name: Push changes | |
run: git push | |
env: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} |