forked from Dev-47/quiz-app
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.24 KB
/
frontend-linters.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
name: JavaScript Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
env:
working-dir: ./web
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.JS
uses: actions/setup-node@v2
with:
node-version: "14"
- name: Install prettier
run: |
npm install --save-dev --save-exact prettier
working-directory: ${{env.working-dir}}
- name: Run linting
run: |
npx prettier --write .
- name: Setting Identify for Git
run: |
git config user.email "dev-47.pilot@dev-47.com"
git config user.name "Dev 47 Pilot"
- name: Fetching changes from remote url on HTTPS
run: |
git remote add set-url https://github.com/Dev-47/quiz-app.git
git pull origin main
- name: Check for changes
run: git status
- name: Stage changed files
run: |
git add .
- name: Commit changed files
continue-on-error: true
run: |
git commit -m "GH-ACTIONS / updates new linted files"
- name: Push code to main
run: |
git push origin HEAD:main