name: "Continuous Integration"

on:
  push:
    branches: [ "feat/refresh" ]
  pull_request:
    branches: [ "feat/refresh" ]

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

env:
  HUSKY: 0

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 2

      - name: Install Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: npm

      - name: Install dependencies
        run: npm ci

      - name: Copy env
        run: cp .env.example .env

      - name: Build
        run: npm run build
