improvement: tailwind cli to build stylesheet

This commit is contained in:
joncrangle
2023-11-13 21:44:11 -05:00
parent 6bff28e18d
commit 78454f8713
7 changed files with 74 additions and 6 deletions

37
.github/workflows/build-css.yaml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Build Tailwind CSS
on:
push:
paths:
- "handlers/form.html"
workflow_dispatch:
jobs:
tailwindbuilder:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
-
name: Build Tailwind CSS
run: pnpm build
-
name: Commit generated stylesheet
run: |
if git diff --quiet; then
echo "No changes to commit."
exit 0
else
echo "Changes detected, committing..."
git config --global user.name "Github action"
git config --global user.email "username@users.noreply.github.com"
git add cmd
git commit -m "Generated stylesheet"
git push
fi