update docs #84
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 and Deployment | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- run: npm i --omit=optional | |
name: Install dependencies | |
- run: npm run lint | |
name: Run lintings | |
- run: npm run prettier:check | |
name: Run prettier checks | |
- run: npm test | |
name: Run tests | |
deploy: | |
name: Deploy package | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm i --omit=optional | |
name: Install dependencies | |
- run: npm run dist | |
name: Build package | |
- run: npm run publish:pkg | |
name: Publish package | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |