From 93c40ab0a2e3b88a68710b2c9ca40644c983585d Mon Sep 17 00:00:00 2001 From: onkofonko Date: Sat, 25 Jan 2025 21:23:27 +0100 Subject: [PATCH] Create workflow for theme --- .github/workflows/optimize-css.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/optimize-css.yml diff --git a/.github/workflows/optimize-css.yml b/.github/workflows/optimize-css.yml new file mode 100644 index 0000000..d6e436d --- /dev/null +++ b/.github/workflows/optimize-css.yml @@ -0,0 +1,28 @@ +name: Optimize CSS + +on: + push: + paths: + - public/theme/source.css + +jobs: + optimize-css: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install CSSO and CSSO-cli + run: npm install -g csso csso-cli + + - name: Optimize CSS + run: csso public/theme/source.css --output public/theme/fixedsource.css + + - name: Commit and push changes + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add public/theme/fixedsource.css + git commit -m 'Optimize theme CSS' + git push \ No newline at end of file