pull/7431/head
zomars 2023-02-24 21:04:38 -07:00
parent d5912767bd
commit e8e437ba01
2 changed files with 6 additions and 21 deletions

View File

@ -1,20 +0,0 @@
name: Production Build
description: "Creates a production build, caches it and restores if necessary"
runs:
using: "composite"
steps:
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/cache-db
id: cache-db
with:
DATABASE_URL: ${{ env.DATABASE_URL }}
- uses: ./.github/actions/cache-build
id: prod-build-cache
- name: Next.js production build
if: steps.cache-db.outputs.cache-hit != 'true'
shell: bash
run: yarn db-seed
- name: Prisma DB seed
if: steps.prod-build-cache.outputs.cache-hit != 'true'
shell: bash
run: yarn build

View File

@ -20,4 +20,9 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/env-read-file
- uses: ./.github/actions/yarn-build
- uses: ./.github/actions/cache-db
with:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
- uses: ./.github/actions/cache-build
- run: yarn db-seed
- run: yarn build