2020-11-23 22:39:32 +01:00
|
|
|
name: "Assets"
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-12-31 14:18:49 +01:00
|
|
|
- 2.*
|
2020-11-23 22:39:32 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
js:
|
|
|
|
name: "Building assets"
|
|
|
|
runs-on: "ubuntu-20.04"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
2022-04-11 21:50:03 +02:00
|
|
|
uses: "actions/checkout@v3"
|
2020-11-23 22:39:32 +01:00
|
|
|
|
|
|
|
- name: "Install Node"
|
2022-01-05 14:01:13 +01:00
|
|
|
uses: actions/setup-node@v2
|
2020-11-23 22:39:32 +01:00
|
|
|
with:
|
|
|
|
node-version: "12"
|
|
|
|
|
|
|
|
- name: "Install dependencies with Yarn"
|
|
|
|
run: "yarn install"
|
|
|
|
|
|
|
|
- name: "Build dev assets"
|
|
|
|
run: "yarn run build:dev"
|
|
|
|
|
|
|
|
- name: "Build prod assets"
|
|
|
|
run: "yarn run build:prod"
|
2020-11-25 11:16:05 +01:00
|
|
|
|
2020-11-30 11:52:44 +01:00
|
|
|
- name: "Validate no change were created"
|
|
|
|
run: |
|
|
|
|
GITDIFF=`git diff`
|
|
|
|
if [ "$GITDIFF" == "" ]; then
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
git diff
|
|
|
|
exit 1
|
|
|
|
fi
|