From 608888317b86bb5292f0d97af9bdbc69327b5b22 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sun, 12 Sep 2021 23:45:14 -0700 Subject: [PATCH] Have nightly build create a production build of tailwind --- .github/workflows/docker-nightly.yaml | 1 + build/release/docker-nightly.sh | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/docker-nightly.yaml b/.github/workflows/docker-nightly.yaml index d9203a5a7..dab6832f5 100644 --- a/.github/workflows/docker-nightly.yaml +++ b/.github/workflows/docker-nightly.yaml @@ -1,6 +1,7 @@ name: Build nightly docker on: + workflow_dispatch: schedule: - cron: "0 2 * * *" diff --git a/build/release/docker-nightly.sh b/build/release/docker-nightly.sh index 07a172fc5..3ccfaa15f 100755 --- a/build/release/docker-nightly.sh +++ b/build/release/docker-nightly.sh @@ -5,6 +5,15 @@ DATE=$(date +"%Y%m%d") VERSION="${DATE}-nightly" GIT_COMMIT=$(git rev-list -1 HEAD) +# Create production build of Tailwind CSS +pushd ../../build/javascript >> /dev/null +# Install the tailwind & postcss CLIs +npm install --quiet --no-progress +# Run the tailwind CLI and pipe it to postcss for minification. +# Save it to a temp directory that we will reference below. +NODE_ENV="production" ./node_modules/.bin/tailwind build | ./node_modules/.bin/postcss > "../../webroot/js/web_modules/tailwindcss/dist/tailwind.min.css" +popd + echo "Building Docker image ${DOCKER_IMAGE}..." # Change to the root directory of the repository