Try another strategy
This commit is contained in:
parent
5763360795
commit
56d67f3752
1 changed files with 3 additions and 11 deletions
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
|
|
@ -19,22 +19,14 @@ jobs:
|
||||||
- name: Create Build Folder
|
- name: Create Build Folder
|
||||||
run: "mkdir -p build"
|
run: "mkdir -p build"
|
||||||
- name: Copy files to build folder
|
- name: Copy files to build folder
|
||||||
run: "yes | cp -f *.{py,json} build/"
|
run: "yes | cp -f *.{js,py,json} build/"
|
||||||
- name: Remove existing JS Files
|
- name: Remove existing minified files
|
||||||
run: "rm build/*.js"
|
run: "rm build/*.min.js"
|
||||||
- name: Copy files to build folder
|
|
||||||
run: |
|
|
||||||
for file in *.js; do
|
|
||||||
cp -- "$file" build/"${file%.js}.min.js"
|
|
||||||
done
|
|
||||||
- name: Minify JavaScript
|
- name: Minify JavaScript
|
||||||
uses: nizarmah/auto-minify@v2.1
|
uses: nizarmah/auto-minify@v2.1
|
||||||
with:
|
with:
|
||||||
overwrite: true
|
|
||||||
directory: 'build'
|
directory: 'build'
|
||||||
js_engine: 'uglify-js'
|
js_engine: 'uglify-js'
|
||||||
- name: Copy non-minified JS Files to build folder
|
|
||||||
run: "yes | cp -f *.js build/"
|
|
||||||
# Eventually only do this step on release
|
# Eventually only do this step on release
|
||||||
- name: Commit Build Files
|
- name: Commit Build Files
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue