From ec0520698e06b62e735520643e75a2af49cb48f7 Mon Sep 17 00:00:00 2001 From: schmelczerandras Date: Sat, 17 Oct 2020 18:46:12 +0200 Subject: [PATCH] Fix build --- .github/workflows/main.yaml | 18 +----------------- backend/Dockerfile | 2 +- package.json | 5 ++++- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 69ccf48..d3cddad 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -16,9 +16,7 @@ jobs: lfs: true - name: Build project run: | - npm install - npm run initialize - npm run build + yarn && yarn run build - name: Deploy frontend uses: w9jds/firebase-action@master with: @@ -26,17 +24,3 @@ jobs: env: FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} PROJECT_PATH: frontend - - name: Authenticate with dockerhub - run: | - docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }} - - name: Install buildx - id: buildx - uses: crazy-max/ghaction-docker-buildx@v1 - with: - version: latest - - name: Build and push server image - run: | - docker buildx build \ - --tag $CONTAINER_REGISTRY/declared-server:latest \ - --platform linux/amd64,linux/arm/v7,linux/arm64 . --push - working-directory: backend diff --git a/backend/Dockerfile b/backend/Dockerfile index 3ea763a..dde1414 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -2,7 +2,7 @@ FROM node:14.13.0-alpine3.10 COPY package.json . -RUN npm install --production +RUN yarn install --production=true COPY dist/main.js main.js diff --git a/package.json b/package.json index 31ff546..faa4718 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,11 @@ "**" ] }, + "devDependencies": { + "concurrently": "^5.3.0" + }, "scripts": { - "build": "yarn workspaces shared run build && yarn workspaces frontend run build && yarn workspaces backend run build", + "build": "yarn workspace shared run build && yarn workspace decla.red-frontend run build && yarn workspace declared-server run build", "lint": "eslint './**/src/**/*.{js,ts,json}' --fix", "frontend": "yarn workspace decla.red-frontend start", "shared": "yarn workspace shared start",