feat(theme): refine login page, soften UI borders, adjust dark mode c… #6
This file contains hidden or 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
| name: Build and Commit | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - ".dev/src/**" | |
| - ".dev/public/**" | |
| - ".dev/scripts/**" | |
| - ".dev/vite.config.ts" | |
| - ".dev/package.json" | |
| - ".dev/pnpm-lock.yaml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-commit: | |
| name: Build frontend assets | |
| runs-on: ubuntu-latest | |
| if: "!startsWith(github.event.head_commit.message, 'build:')" | |
| defaults: | |
| run: | |
| working-directory: .dev | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: "lts/*" | |
| - name: Enable Corepack and use latest pnpm | |
| run: | | |
| corepack enable | |
| corepack use pnpm@latest | |
| echo "pnpm version: $(pnpm --version)" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build frontend assets | |
| run: pnpm build | |
| - name: Check for build output changes | |
| id: check-changes | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| if [ -n "$(git status --porcelain htdocs/)" ]; then | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| echo "📦 Changes detected in htdocs/:" | |
| git status --short htdocs/ | |
| else | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| echo "✅ No changes in build output" | |
| fi | |
| - name: Generate build report | |
| if: steps.check-changes.outputs.has_changes == 'true' | |
| id: build-report | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| echo "Changed Files:" > /tmp/build-report.txt | |
| git diff --name-status htdocs/ | sed 's/^/ - /' >> /tmp/build-report.txt | |
| echo "" >> /tmp/build-report.txt | |
| echo "Build Size:" >> /tmp/build-report.txt | |
| ls -lh htdocs/luci-static/outline/main.css htdocs/luci-static/resources/view/outline/sysauth.js htdocs/luci-static/resources/menu-outline.js 2>/dev/null | awk '{size=$5; if(size ~ /^[0-9]+$/ && size < 1024) size=size"B"; printf " - %-53s %s\n", $9, size}' >> /tmp/build-report.txt | |
| cat /tmp/build-report.txt | |
| - name: Commit and push build outputs | |
| if: steps.check-changes.outputs.has_changes == 'true' | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add htdocs/ .dev/package.json | |
| { | |
| echo "build: update frontend assets" | |
| echo "" | |
| cat /tmp/build-report.txt | |
| } | git commit -F - | |
| git push |