Skip to content

🚀 Make deploy-to-VPS workflow template-safe #17

🚀 Make deploy-to-VPS workflow template-safe

🚀 Make deploy-to-VPS workflow template-safe #17

name: Auto Lint & Format
on: [push, pull_request]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
# Skip npm ci if no lockfile exists
- name: Skip npm ci if no package-lock
run: |
if [ -f package-lock.json ]; then
npm ci
else
echo "🔧 No package-lock.json, skipping npm ci"
fi
- name: Run Prettier
run: npx prettier --write .
- name: Run ESLint
run: npx eslint . --fix