Skip to content

Commit 9f3166e

Browse files
committed
Try install tailwind in GH Action
1 parent 209946f commit 9f3166e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/build-container.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,28 @@ jobs:
4545
id: check_client
4646
run: |
4747
if [ -d "MyApp.Client" ] && [ -f "MyApp.Client/package.json" ]; then
48-
echo "client_exists=true" >> $GITHUB_OUTPUT
49-
else
50-
echo "client_exists=false" >> $GITHUB_OUTPUT
48+
echo "requires_npm=true" >> $GITHUB_OUTPUT
49+
elif [ -f "MyApp/package.json" ] && grep -q "tailwindcss -i" "MyApp/package.json"; then
50+
echo "requires_tailwind=true" >> $GITHUB_OUTPUT
5151
fi
5252
5353
- name: Setup Node.js
54-
if: steps.check_client.outputs.client_exists == 'true'
54+
if: steps.check_client.outputs.requires_npm == 'true'
5555
uses: actions/setup-node@v3
5656
with:
5757
node-version: 22
5858

5959
- name: Install npm dependencies
60-
if: steps.check_client.outputs.client_exists == 'true'
60+
if: steps.check_client.outputs.requires_npm == 'true'
6161
working-directory: ./MyApp.Client
6262
run: npm install
6363

64+
- name: Install tailwindcss
65+
if: steps.check_client.outputs.requires_tailwind == 'true'
66+
run: |
67+
curl 'https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64' -o "MyApp/tailwindcss"
68+
chmod +x "MyApp/tailwindcss"
69+
6470
- name: Install x tool
6571
run: dotnet tool install -g x
6672

0 commit comments

Comments
 (0)