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
|
|
|
|
2022-04-16 01:58:38 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-11-23 21:39:32 +00:00
|
|
|
jobs:
|
|
|
|
js:
|
|
|
|
name: "Building assets"
|
|
|
|
runs-on: "ubuntu-20.04"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
2022-04-11 19:50:03 +00:00
|
|
|
uses: "actions/checkout@v3"
|
2020-11-23 21:39:32 +00:00
|
|
|
|
|
|
|
- name: "Install Node"
|
2022-04-19 19:05:39 +00:00
|
|
|
uses: actions/setup-node@v3
|
2020-11-23 21:39:32 +00:00
|
|
|
with:
|
2022-05-23 06:04:16 +00:00
|
|
|
node-version: "16"
|
2020-11-23 21:39:32 +00:00
|
|
|
|
|
|
|
- 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
|