cal.pub0.org/.github/workflows/production-build.yml

31 lines
732 B
YAML

name: Production Build
on:
workflow_call:
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: postgres:12.1
env:
POSTGRES_USER: postgres
POSTGRES_DB: calendso
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/cache-db
id: cache-db
- uses: ./.github/actions/cache-build
id: cache-build
- run: yarn db-seed
if: steps.cache-db.outputs.cache-hit != 'true'
- run: yarn build
if: steps.cache-build.outputs.cache-hit != 'true'