Skip to content

Merge pull request #236 from Micky261/docker_workflow #7

Merge pull request #236 from Micky261/docker_workflow

Merge pull request #236 from Micky261/docker_workflow #7

Workflow file for this run

name: Build, Dockerize and Push Frontend
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# node-version: [18.x, 20.x, 22.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Build for production
run: yarn build-prod
# Check if dist folder is there
- name: print folders
run: |
ls ./
ls ./dist/
# Check if dist folder is there
- name: print dist folders
run: |
ls ./dist/threed-model-manager-frontend
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_ACCESS_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push Docker images
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
uses: docker/[email protected]
with:
# Path to the Dockerfile
# file: ./
# Push is a shorthand for --output=type=registry
push: true
# List of tags
tags: 3dmm/frontend:latest
context: .