From b054ef07b3644341ff39feea045cabf9bb414ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Mon, 5 Apr 2021 21:05:20 +0200 Subject: [PATCH] Add GH Actions workflow automatically building assets (#147) --- .github/workflows/assets.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/assets.yaml diff --git a/.github/workflows/assets.yaml b/.github/workflows/assets.yaml new file mode 100644 index 000000000..cf2cb2d04 --- /dev/null +++ b/.github/workflows/assets.yaml @@ -0,0 +1,31 @@ +name: Assets build +on: + push: + branches: + - main +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Erlang & Elixir + uses: erlef/setup-elixir@v1 + with: + otp-version: '23.2' + elixir-version: '1.11.3' + # 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