-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 944 Bytes
/
build.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
name: Build
on:
push:
branches-ignore: [master]
pull_request:
branches: [master]
workflow_dispatch:
env:
MIX_ENV: dev
jobs:
build:
name: Build Elixir App
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Caching dependencies and compilation results
id: cache
uses: actions/cache@v3
with:
path: |
_build
deps
key: ${{ runner.os }}-${{ env.MIX_ENV }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Setup Elixir
uses: erlef/setup-beam@v1
with:
otp-version: 25
elixir-version: 1.14
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
mix deps.get --only ${MIX_ENV}
mix deps.compile --force
- name: Compile app
run: mix compile