Files
documenso/.github/actions/cache-build/action.yml
nafees nazik ce6f523230 fix: key
2024-01-04 23:56:32 +05:30

31 lines
878 B
YAML

name: Cache production build binaries
description: 'Cache or restore if necessary'
inputs:
node_version:
required: false
default: v18.x
runs:
using: 'composite'
steps:
- name: Cache production build
uses: actions/cache@v3
id: production-build-cache
env:
cache-name: prod-build
key-1: ${{ hashFiles('**/package-lock.json') }}
key-2: ${{ github.run_id }}
# Ensures production-build.yml will always be fresh
key-3: ${{ github.sha }}
with:
path: |
${{ github.workspace }}/apps/web/.next
${{ github.workspace }}/apps/marketing/.next
**/.turbo/**
**/dist/**
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}
- run: npm run build
if: steps.production-build-cache.outputs.cache-hit != 'true'