diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml new file mode 100644 index 0000000..d54f40b --- /dev/null +++ b/.github/workflows/minify.yml @@ -0,0 +1,27 @@ +on: + push: + branches: + - 'main' + paths: + - 'theme-dark-arc.css' + workflow_dispatch: + +jobs: + minify: + runs-on: ubuntu-latest + steps: + - name: check out the repository + uses: actions/checkout@v4 + + - name: auto minify the files + uses: nizarmah/auto-minify@v3 + with: + overwrite: false + maxdepth: 1 + + - name: auto commit the minified files + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "bot: Minify theme" + file_pattern: '*.min.css' + branch: ${{ github.ref }} diff --git a/README.md b/README.md index ec283f8..6130b4b 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Create `/public/assets/css` below your $GITEA_CUSTOM path, MY custom path is `/v sudo mkdir -p /var/lib/gitea/custom/public/assets/css cd /var/lib/gitea/custom/public/assets/css - wget https://raw.githubusercontent.com/Jieiku/theme-dark-arc-gitea/main/theme-dark-arc.css + curl -o theme-dark-arc.css https://raw.githubusercontent.com/Jieiku/theme-dark-arc-gitea/main/theme-dark-arc.min.css ## Make sure ownership is correct: