diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 0695eb9..235c424 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -16,9 +16,24 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: printf 'const awsmobile = {}; \n\nexport default awsmobile;' > ./src/aws-exports.js - - run: yarn install - - run: yarn run build --if-present - - run: yarn run lint + + - name: Install and Build + run: | + yarn install + yarn run build --if-present + + - name: Lint + run: | + yarn run lint + + - name: Fix:Lint and Commit + if: failure() + run: | + yarn run lint:ga-fix + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -am "Cleaning ${{ github.actor }}'s lint" + git push + env: CI: true diff --git a/package.json b/package.json index cbbe9fe..93805fe 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "test": "react-scripts test", "eject": "react-scripts eject", "lint": "eslint ./src", - "lint:fix": "eslint ./src --fix" + "lint:ga-fix": "eslint --ignore-pattern '/build/' . --fix" }, "eslintConfig": { "extends": "react-app" diff --git a/src/App.js b/src/App.js index 22274d7..693b8f4 100644 --- a/src/App.js +++ b/src/App.js @@ -6,15 +6,12 @@ function App() { return (
- logo + logo

- Edit src/App.js and save to reload. + Edit src/App.js + and save to reload.

- + Learn Nothing