Update index.html #138
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Minify CSS and Js | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| convert: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Auto Minify | |
| uses: nizarmah/[email protected] | |
| with: | |
| overwrite: true | |
| - name: Commit and push if changed | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| git add . | |
| git commit -m "Minify Code" | |
| if git diff --staged --quiet; then | |
| echo "No changes" | |
| else | |
| git pull -f origin publish --rebase | |
| git checkout publish | |
| git checkout --ours "src/main.js" | |
| git checkout --ours "src/style.css" | |
| git add . | |
| git commit -m "Minify Code" | |
| git push -f | |
| fi |