Merge pull request #25 from daymosik/change-codecov #35
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: build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 22.x ] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install | |
env: | |
CI: true | |
- name: Install codecov | |
run: npm install codecov -g | |
env: | |
CI: true | |
- name: Lint | |
run: npm run lint | |
env: | |
CI: true | |
- name: Test | |
run: npm run test | |
env: | |
CI: true | |
- name: Build | |
run: npm run build | |
env: | |
CI: true | |
- name: Build docs | |
run: npm run build-docs | |
env: | |
CI: true | |
- name: Upload coverage reports to Codecov with GitHub Action | |
uses: codecov/[email protected] | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Deploy to GitHub Pages | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v2 | |
with: | |
target_branch: gh-pages | |
build_dir: docs-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAGES_TOKEN }} |