-
Notifications
You must be signed in to change notification settings - Fork 949
61 lines (52 loc) · 1.45 KB
/
assets.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Assets
on:
push:
branches:
- main
- "v*.*"
jobs:
build:
runs-on: ubuntu-22.04
env:
elixir: 1.18.1
otp: 27.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ env.elixir }}
otp-version: ${{ env.otp }}
- name: Restore deps and _build cache
uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-${{ hashFiles('**/mix.lock') }}-dev
restore-keys: |
${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-
- name: Install Dependencies
run: mix deps.get --only dev
- name: Set up Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Restore npm cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
run: npm ci --prefix assets
- name: Build assets
run: mix assets.build
- name: Push updated assets
id: push_assets
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update assets
file_pattern: priv/static