demarches-normaliennes/.github/actions/ci-setup-assets/action.yml

25 lines
839 B
YAML
Raw Permalink Normal View History

name: 'Setup Rails assets'
description: 'Pre-compile and cache the app assets'
runs:
using: composite
steps:
- name: Assets cache
2024-03-13 11:06:24 +01:00
uses: actions/cache@v4
with:
path: |
public/assets
public/packs-test
tmp/cache/webpacker
key: asset-cache-${{ runner.os }}-${{ hashFiles('patches/**/*.patch') }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
asset-cache-${{ runner.os }}-${{ hashFiles('patches/**/*.patch') }}-${{ github.ref }}-${{ github.sha }}
asset-cache-${{ runner.os }}-${{ hashFiles('patches/**/*.patch') }}-${{ github.ref }}-
asset-cache-${{ runner.os }}-${{ hashFiles('patches/**/*.patch') }}
- name: Precompile assets
env:
RAILS_ENV: test
2024-03-13 11:06:24 +01:00
run: bin/rails assets:precompile --trace
shell: bash