Skip to content

Commit

Permalink
Cache asset compilation results on CI (mastodon#30868)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski authored Aug 26, 2024
1 parent dbe0ee8 commit 963c130
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,24 @@ jobs:
with:
onlyProduction: 'true'

- name: Cache assets from compilation
uses: actions/cache@v4
with:
path: |
public/assets
public/packs
public/packs-test
tmp/cache/webpacker
key: ${{ matrix.mode }}-assets-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
restore-keys: |
${{ matrix.mode }}-assets-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
${{ matrix.mode }}-assets-${{ github.head_ref || github.ref_name }}
${{ matrix.mode }}-assets-main
${{ matrix.mode }}-assets
- name: Precompile assets
# Previously had set this, but it's not supported
# export NODE_OPTIONS=--openssl-legacy-provider
run: |-
./bin/rails assets:precompile
bin/rails assets:precompile
- name: Archive asset artifacts
run: |
Expand Down

0 comments on commit 963c130

Please sign in to comment.