.github/workflows/build.yml
name: build
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout ๐๏ธ
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
name: Install pnpm ๐ฆ
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory ๐ฆ
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache ๐ฆ
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies ๐ฆ
run: pnpm install
- name: Lint ๐งน
run: pnpm run lint
- name: Build ๐ง
run: pnpm run build
- name: Test ๐งช
run: pnpm run coverage
- name: Upload Coverage ๐
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageLocations: ${{github.workspace}}/coverage/clover.xml:clover
- name: Build Docs ๐
run: |
pnpm run docs
- name: Deploy ๐
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: docs