chore(github): run ci workflow on push to master branch #350
This file contains 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: ci | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master, stage] | |
jobs: | |
commitlint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Lints Pull Request commits | |
uses: wagoid/commitlint-github-action@v5 | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install npm dependencies | |
run: npm install --progress=false --loglevel=warn --ignore-scripts | |
- name: Build dist | |
run: npm run build | |
- name: Lint code | |
run: npm run lint |