FIX: workflow
This commit is contained in:
16
.github/workflows/minify.yml
vendored
16
.github/workflows/minify.yml
vendored
@@ -20,14 +20,12 @@ jobs:
|
|||||||
npm i -g terser csso-cli html-minifier
|
npm i -g terser csso-cli html-minifier
|
||||||
|
|
||||||
# Use CLI tools to minify, overwriting existing files
|
# Use CLI tools to minify, overwriting existing files
|
||||||
- run: |
|
- run: for i in `find . -name "*.js" -type f`; do terser $i --compress -o $i; done
|
||||||
for i in `find . -name "*.js" -type f`; do terser $i --compress -o $i; done
|
- run: for i in `find . -name "*.css" -type f`; do csso $i -o $i; done
|
||||||
for i in `find . -name "*.css" -type f`; do csso $i -o $i; done
|
- run: for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done
|
||||||
for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done
|
|
||||||
|
|
||||||
# Push changes to `build` branch
|
# Push changes to `build` branch
|
||||||
- run: |
|
- run: git config user.name ${{github.actor}}
|
||||||
git config user.name ${{github.actor}}
|
- run: git config user.email ${{github.actor}}@user.noreply.github.com
|
||||||
git config user.email ${{github.actor}}@user.noreply.github.com
|
- run: git commit -am 'Automated minify of ${{github.sha}}'
|
||||||
git commit -am 'Automated minify of ${{github.sha}}'
|
- run: git push --force -u origin main:build
|
||||||
git push --force -u origin build
|
|
||||||
|
|||||||
Reference in New Issue
Block a user