Fix build

This commit is contained in:
schmelczerandras 2020-10-17 18:46:12 +02:00
parent e83c58e1a5
commit ec0520698e
3 changed files with 6 additions and 19 deletions

View file

@ -16,9 +16,7 @@ jobs:
lfs: true lfs: true
- name: Build project - name: Build project
run: | run: |
npm install yarn && yarn run build
npm run initialize
npm run build
- name: Deploy frontend - name: Deploy frontend
uses: w9jds/firebase-action@master uses: w9jds/firebase-action@master
with: with:
@ -26,17 +24,3 @@ jobs:
env: env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_PATH: frontend 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

View file

@ -2,7 +2,7 @@ FROM node:14.13.0-alpine3.10
COPY package.json . COPY package.json .
RUN npm install --production RUN yarn install --production=true
COPY dist/main.js main.js COPY dist/main.js main.js

View file

@ -11,8 +11,11 @@
"**" "**"
] ]
}, },
"devDependencies": {
"concurrently": "^5.3.0"
},
"scripts": { "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", "lint": "eslint './**/src/**/*.{js,ts,json}' --fix",
"frontend": "yarn workspace decla.red-frontend start", "frontend": "yarn workspace decla.red-frontend start",
"shared": "yarn workspace shared start", "shared": "yarn workspace shared start",