Skip to content

Improve build

Improve build #6

Workflow file for this run

name: Test and Lint
on:
pull_request:
jobs:
build:
if: ${{ github.head_ref != 'main' }}
name: Test and Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: refs/heads/${{ github.head_ref }}
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: 20.2.0
- name: Install NPM Dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "[skip ci] Lint - By Github Actions" || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}