Skip to content

Add Github Actions

Add Github Actions #1

Workflow file for this run

name: CI Workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Run ESLint
run: npm run lint
- name: Run tests
run: npm test
- name: Build the project
run: npm run build
- name: Commit built files
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add dist/
git commit -m "Build and minify files [skip ci]"
if: success()
- name: Push changes
run: git push
if: success()