mirror of
https://git.aramjonghu.nl/AramJonghu/aramjonghu-site.git
synced 2026-06-06 17:18:24 +02:00
34 lines
906 B
YAML
34 lines
906 B
YAML
name: Format frontend with Prettier
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
|
|
jobs:
|
|
format:
|
|
runs-on: linux
|
|
container: alpine:latest
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
run: apk add --no-cache nodejs npm git
|
|
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install frontend deps
|
|
working-directory: frontend
|
|
run: npm install
|
|
|
|
- name: Run Prettier
|
|
working-directory: frontend
|
|
run: npx prettier --write .
|
|
|
|
- name: Commit changes
|
|
run: |
|
|
git config user.name "forgejo-bot"
|
|
git config user.email "forgejo-bot@local"
|
|
git add frontend
|
|
git diff --cached --quiet || git commit -m "chore: format frontend with prettier"
|
|
git push
|