File tree 2 files changed +88
-0
lines changed
2 files changed +88
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Assets
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - " v*.*"
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-22.04
12
+ env :
13
+ elixir : 1.14.0
14
+ otp : 24.3
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+
18
+ - uses : erlef/setup-beam@v1
19
+ with :
20
+ elixir-version : ${{ env.elixir }}
21
+ otp-version : ${{ env.otp }}
22
+
23
+ - name : Cache Mix
24
+ uses : actions/cache@v4
25
+ with :
26
+ path : |
27
+ deps
28
+ _build
29
+ key : ${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-${{ hashFiles('**/mix.lock') }}-dev
30
+ restore-keys : |
31
+ ${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-
32
+
33
+ - name : Install Dependencies
34
+ run : mix deps.get --only dev
35
+
36
+ - name : Setup Node.js 18.x
37
+ uses : actions/setup-node@v3
38
+ with :
39
+ node-version : 18
40
+
41
+ - name : Cache npm dependencies
42
+ uses : actions/cache@v4
43
+ with :
44
+ path : ~/.npm
45
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
46
+ restore-keys : |
47
+ ${{ runner.os }}-node-
48
+
49
+ - name : Install npm dependencies
50
+ run : npm ci --prefix assets
51
+
52
+ - name : Build assets
53
+ run : mix assets.build
54
+
55
+ - name : Push updated assets
56
+ id : push_assets
57
+ uses : stefanzweifel/git-auto-commit-action@v5
58
+ with :
59
+ commit_message : Update assets
60
+ file_pattern : dist
Original file line number Diff line number Diff line change 51
51
otp-version : ${{matrix.pair.otp}}
52
52
elixir-version : ${{matrix.pair.elixir}}
53
53
54
+ - name : Cache Mix
55
+ uses : actions/cache@v4
56
+ with :
57
+ path : |
58
+ deps
59
+ _build
60
+ key : ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }}-test
61
+ restore-keys : |
62
+ ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-
63
+
54
64
- name : Install Dependencies
55
65
run : mix deps.get --only test
56
66
78
88
elixir-version : 1.14.0
79
89
otp-version : 24.3
80
90
91
+ - name : Cache Mix
92
+ uses : actions/cache@v4
93
+ with :
94
+ path : |
95
+ deps
96
+ _build
97
+ key : ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }}-test
98
+ restore-keys : |
99
+ ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-
100
+
81
101
- name : Install Dependencies
82
102
run : mix deps.get --only test
83
103
@@ -86,6 +106,14 @@ jobs:
86
106
with :
87
107
node-version : 18
88
108
109
+ - name : Cache npm dependencies
110
+ uses : actions/cache@v4
111
+ with :
112
+ path : ~/.npm
113
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
114
+ restore-keys : |
115
+ ${{ runner.os }}-node-
116
+
89
117
- name : npm install and test
90
118
run : |
91
119
cd assets
You can’t perform that action at this time.
0 commit comments