diff --git a/.github/workflows/minifier.yml b/.github/workflows/minifier.yml new file mode 100644 index 0000000..bb5bc9c --- /dev/null +++ b/.github/workflows/minifier.yml @@ -0,0 +1,29 @@ +name: minifier + +on: + pull_request: + push: + branches: + - main + +jobs: + php-cs-fixer: + runs-on: ubuntu-latest + + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository. + contents: write + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - name: Minify Action + uses: dra1ex/minify-action@v1.0.3 + + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + branch: minified + create_branch: true + commit_message: Apply minifications diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index ad19975..5b3c5fa 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -4,7 +4,7 @@ name: Deploy static content to Pages on: # Runs on pushes targeting the default branch push: - branches: ["main"] + branches: ["minified"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: