2020-11-23 21:39:32 +00:00
|
|
|
name: "Assets"
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-12-31 13:18:49 +00:00
|
|
|
- 2.*
|
2020-11-23 21:39:32 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
js:
|
|
|
|
name: "Building assets"
|
|
|
|
runs-on: "ubuntu-20.04"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
|
|
|
uses: "actions/checkout@v2"
|
|
|
|
|
|
|
|
- name: "Install Node"
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
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 10:16:05 +00:00
|
|
|
|
2020-11-30 10:52:44 +00:00
|
|
|
- name: "Validate no change were created"
|
|
|
|
run: |
|
|
|
|
GITDIFF=`git diff`
|
|
|
|
if [ "$GITDIFF" == "" ]; then
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
git diff
|
|
|
|
exit 1
|
|
|
|
fi
|