Updated dependencies #247
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check build & lint errors | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install node@20 | |
| uses: actions/setup-node@v4.0.2 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Pull latest changes | |
| run: git pull | |
| - name: Test build | |
| run: npm run build | |
| - name: Test Lint | |
| run: npx eslint "src/**" --fix | |
| - name: Commit changes | |
| id: commit | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| if git diff-index --quiet HEAD; then | |
| echo "No changes to commit." | |
| echo "changes_committed=false" >> $GITHUB_ENV | |
| else | |
| git commit -m "chore: format code with eslint" | |
| echo "changes_committed=true" >> $GITHUB_ENV | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push changes | |
| if: env.changes_committed == 'true' | |
| run: git push | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |