Skip to content

Fix app prod build in dockerfile #3

Fix app prod build in dockerfile

Fix app prod build in dockerfile #3

Workflow file for this run

name: Check CI
on:
# Run on pull requests to primary branches
pull_request:
branches:
- master
- main
- dev
paths:
- '.github/workflows/check.yml'
- 'app/**'
- 'docker-compose*.yml'
# Run on manual triggers
workflow_dispatch:
# Set GITHUB_TOKEN permissions
permissions:
contents: read
# Set workflow concurrency rules
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Build job
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build for production
env:
GITHUB_REPOSITORY_URL: https://github.com/${{ github.repository }}
GITHUB_SHA: ${{ github.sha }}
BUILD_CHECK: "true"
run: docker compose -f docker-compose.yml -f docker-compose.cicd.yml build
- name: Copy application files
run: docker compose -f docker-compose.yml -f docker-compose.cicd.yml run --rm app
- name: Check application files
run: |
[ -d ./app/dist ] && [ $(ls -1 ./app/dist | wc -l) -gt 0 ] \
&& echo "Application files found" \
|| ( echo "No application files found" && exit 1 )