2021-04-06 03:05:20 +08:00
|
|
|
name: Assets build
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
jobs:
|
|
|
|
main:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install Erlang & Elixir
|
2021-05-19 22:46:33 +08:00
|
|
|
uses: erlef/setup-beam@v1
|
2021-04-06 03:05:20 +08:00
|
|
|
with:
|
2021-05-19 22:46:33 +08:00
|
|
|
otp-version: '24.0'
|
|
|
|
elixir-version: '1.12.0'
|
2021-04-06 03:05:20 +08:00
|
|
|
# Note: we need to get Phoenix and LV because package.json points to them directly
|
|
|
|
- name: Install mix dependencies
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Install Node
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '14.x'
|
|
|
|
- name: Install npm dependencies
|
|
|
|
run: npm ci --prefix assets
|
|
|
|
- name: Build assets
|
|
|
|
run: npm run deploy --prefix assets
|
|
|
|
- name: Update assets
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
|
|
|
commit_message: Update assets
|
|
|
|
file_pattern: priv/static
|