|
@@ -1,37 +1,44 @@
|
|
|
# This is a basic workflow to help you get started with Actions
|
|
# This is a basic workflow to help you get started with Actions
|
|
|
|
|
|
|
|
-name: Auto Minify Theme CSS file
|
|
|
|
|
|
|
+name: Auto Minify CSS/JS file
|
|
|
|
|
|
|
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
|
# events but only for the dev branch
|
|
# events but only for the dev branch
|
|
|
on:
|
|
on:
|
|
|
push:
|
|
push:
|
|
|
branches: [ dev ]
|
|
branches: [ dev ]
|
|
|
|
|
+ paths:
|
|
|
|
|
+ - 'public/assets/css/**'
|
|
|
|
|
+ - 'public/assets/js/**'
|
|
|
|
|
+ - 'public/theme/material/css/**'
|
|
|
|
|
+ - 'public/theme/material/js/**'
|
|
|
pull_request:
|
|
pull_request:
|
|
|
branches: [ dev ]
|
|
branches: [ dev ]
|
|
|
|
|
|
|
|
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
|
|
|
jobs:
|
|
jobs:
|
|
|
- # This workflow contains a single job called "build"
|
|
|
|
|
build:
|
|
build:
|
|
|
- # The type of runner that the job will run on
|
|
|
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
|
-
|
|
|
|
|
- # Steps represent a sequence of tasks that will be executed as part of the job
|
|
|
|
|
steps:
|
|
steps:
|
|
|
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
|
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/checkout@v2
|
|
|
-
|
|
|
|
|
- # Runs a single command using the runners shell
|
|
|
|
|
- name: Auto Minify Theme CSS file
|
|
- name: Auto Minify Theme CSS file
|
|
|
uses: nizarmah/auto-minify@master
|
|
uses: nizarmah/auto-minify@master
|
|
|
with:
|
|
with:
|
|
|
directory: 'public/theme/material/css'
|
|
directory: 'public/theme/material/css'
|
|
|
-
|
|
|
|
|
- # Runs a set of commands using the runners shell
|
|
|
|
|
|
|
+ - name: Auto Minify Theme JS file
|
|
|
|
|
+ uses: nizarmah/auto-minify@master
|
|
|
|
|
+ with:
|
|
|
|
|
+ directory: 'public/theme/material/js'
|
|
|
|
|
+ - name: Auto Minify CSS file
|
|
|
|
|
+ uses: nizarmah/auto-minify@master
|
|
|
|
|
+ with:
|
|
|
|
|
+ directory: 'public/assets/css'
|
|
|
|
|
+ - name: Auto Minify JS file
|
|
|
|
|
+ uses: nizarmah/auto-minify@master
|
|
|
|
|
+ with:
|
|
|
|
|
+ directory: 'public/assets/js'
|
|
|
- name: Auto committing minified files
|
|
- name: Auto committing minified files
|
|
|
uses: stefanzweifel/[email protected]
|
|
uses: stefanzweifel/[email protected]
|
|
|
with:
|
|
with:
|
|
|
- repository: 'public/theme/material/css'
|
|
|
|
|
- commit_message: "Github Action: Auto Minified Theme CSS file"
|
|
|
|
|
|
|
+ repository: 'public'
|
|
|
|
|
+ commit_message: "Github Action: Auto Minified Theme CSS/JS Files"
|
|
|
branch: ${{ github.ref }}
|
|
branch: ${{ github.ref }}
|