-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (35 loc) · 1 KB
/
format.yml
File metadata and controls
38 lines (35 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Format Code
on:
push:
paths:
- "**.html"
- "assets/css/*.css"
- "package.json"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Use Node.js 12.x
uses: actions/setup-node@v2.1.5
with:
node-version: "12.x"
- name: Install dependencies
run: npm ci
- name: Install deps in ./assets
run: npm install ./assets --prefix ./assets
- name: Fix file location
run: |
mkdir -p ./assets/js
mv ./assets/node_modules/@bkbaalkrshna/switch-theme/src/switch.js ./assets/js/switch.js
- name: Run format
run: npm run format
- name: Check code style
run: npm run format:check
- name: Commit and push changes
uses: EndBug/add-and-commit@v7
with:
author_name: github-actions[bot]
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: "run format"