-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced actions/ by nizarmah/ Also added auto committing done by @stefanzweifel
- Loading branch information
Showing
1 changed file
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,17 @@ Minifies JS and CSS files with UglifyJS and CleanCSS | |
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so auto-minify job can access it | ||
- uses: actions/checkout@v2 | ||
- name: Auto Minify | ||
uses: actions/auto-minify@v1 | ||
uses: nizarmah/auto-minify@v1 | ||
# Auto commits minified files to the repository | ||
# Ignore it if you don't want to commit the files to the repository | ||
- name: Auto committing minified files | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: "Github Action: Auto Minified JS and CSS files" | ||
branch: ${{ github.ref }} | ||
``` | ||
|
||
##### Specifying output directory | ||
|
@@ -30,9 +38,17 @@ steps: | |
- uses: actions/checkout@v2 | ||
- name: Auto Minify | ||
uses: actions/auto-minify@v1 | ||
uses: nizarmah/auto-minify@v1 | ||
with: | ||
directory: 'js' | ||
# Auto commits minified files to the repository | ||
# Ignore it if you don't want to commit the files to the repository | ||
- name: Auto committing minified files | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: "Github Action: Auto Minified JS and CSS files" | ||
branch: ${{ github.ref }} | ||
``` | ||
|
||
##### With different output directory | ||
|
@@ -43,10 +59,18 @@ steps: | |
- uses: actions/checkout@v2 | ||
- name: Auto Minify | ||
uses: actions/auto-minify@v1 | ||
uses: nizarmah/auto-minify@v1 | ||
with: | ||
directory: 'js' | ||
output: 'mini_js' | ||
# Auto commits minified files to the repository | ||
# Ignore it if you don't want to commit the files to the repository | ||
- name: Auto committing minified files | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: "Github Action: Auto Minified JS and CSS files" | ||
branch: ${{ github.ref }} | ||
``` | ||
|
||
> Please note that you will have to `commit` the changed files using a different `action` |