[bug] added validators to 404 routes for dynamic routes #467
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: Prettier | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
- name: Prettify Code | |
run: | | |
npm install | |
npx prettier --write "src/**/*.{js,jsx,ts,tsx,json,css,md}" | |
- name: Commit changes | |
if: success() | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
FILES=$(git diff --name-only --staged) | |
if [ -z "$FILES" ]; then | |
echo "No changes to commit." | |
exit 0 | |
else | |
git commit -m "Prettify Code: $FILES" | |
fi | |
- name: Push changes | |
if: success() | |
uses: ad-m/github-push-action@v0.6.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.head_ref }} |