Skip to content

build: improvements

build: improvements #4

Workflow file for this run

name: Build and Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.x"
cache: true
cache-dependency-path: ./server/packages.lock.json
- run: pnpm i
- name: Lint client
run: pnpm lint
working-directory: ./client
- name: Build client
run: pnpm client:build
- name: Build server
run: pnpm server:build
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build docker
run: pnpm docker:build
- name: Push docker
run: pnpm docker:push
if: github.ref == 'refs/heads/main'