mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 00:32:43 +10:00
feat: add cache build action
This commit is contained in:
25
.github/actions/cache-build/action.yml
vendored
Normal file
25
.github/actions/cache-build/action.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
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
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/apps/web/.next
|
||||
${{ github.workspace }}/apps/marketing/.next
|
||||
**/.turbo/**
|
||||
**/dist/**
|
||||
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
|
||||
|
||||
- run: npm run build
|
||||
if: steps.production-build-cache.outputs.cache-hit != 'true'
|
||||
Reference in New Issue
Block a user