-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (54 loc) · 1.77 KB
/
javascript_compile.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
name: JS compile
on:
push:
branches: [master]
pull_request:
env:
MIX_ENV: test
jobs:
javascript-compilation:
name: JavaScript Compilation
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.3.3
if: "github.ref != 'refs/heads/master'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2.4.0
- name: Copy config templates
working-directory: "config"
run: |
cp dev.local.exs.example dev.local.exs
cp test.local.exs.example test.local.exs
- name: Set up Elixir
uses: erlef/setup-elixir@v1.15.0
with:
elixir-version: "1.12.2" # Define the elixir version [required]
otp-version: "24.0" # Define the OTP version [required]
experimental-otp: true
- name: Restore deps cache
uses: actions/cache@v2.1.7
with:
path: |
**/_build
**/deps
key: ${{ runner.os }}-mix-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-${{ secrets.CACHE_VERSION }}
- name: Install dependencies
run: mix deps.get
- name: Set up node
uses: actions/setup-node@v2.5.1
with:
node-version: "15"
- name: Restore npm cache
uses: actions/cache@v2.1.7
with:
path: assets/node_modules
key: ${{ runner.os }}-npm-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-${{ secrets.CACHE_VERSION }}
- name: Install NodeJS deps
run: npm install
working-directory: ./assets
- run: npm run deploy
working-directory: ./assets