From 36f565cf83c59ad9511086aef714c0f1a6b1e1d9 Mon Sep 17 00:00:00 2001 From: Ben Elferink Date: Tue, 28 Jan 2025 20:02:53 +0200 Subject: [PATCH] ci: add "build" workflows (#24) --- .github/workflows/build-backend.yml | 31 ++++++++++++++++++++++++++++ .github/workflows/build-frontend.yml | 31 ++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .github/workflows/build-backend.yml create mode 100644 .github/workflows/build-frontend.yml diff --git a/.github/workflows/build-backend.yml b/.github/workflows/build-backend.yml new file mode 100644 index 0000000..f4f9aa0 --- /dev/null +++ b/.github/workflows/build-backend.yml @@ -0,0 +1,31 @@ +name: Build Backend (Server) + +on: + pull_request: + branches: + - main + +jobs: + build-backend: + runs-on: ubuntu-latest + defaults: + run: + working-directory: './server' + strategy: + matrix: + node-version: [20.x] + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + clean: true + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + cache-dependency-path: './server/package-lock.json' + - run: npm ci + - run: npm run build diff --git a/.github/workflows/build-frontend.yml b/.github/workflows/build-frontend.yml new file mode 100644 index 0000000..ac1a8e2 --- /dev/null +++ b/.github/workflows/build-frontend.yml @@ -0,0 +1,31 @@ +name: Build Frontend (Client) + +on: + pull_request: + branches: + - main + +jobs: + build-frontend: + runs-on: ubuntu-latest + defaults: + run: + working-directory: './client' + strategy: + matrix: + node-version: [20.x] + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + clean: true + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + cache-dependency-path: './client/package-lock.json' + - run: npm ci + - run: npm run build