From c85a6e01a8a12ec31b47b50b0757432544e2cdad Mon Sep 17 00:00:00 2001 From: ehab-hassan Date: Fri, 26 Jan 2024 15:45:42 +0200 Subject: [PATCH 1/8] fix build --- content/blog/dunia_yetu/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/blog/dunia_yetu/index.md b/content/blog/dunia_yetu/index.md index 6c2965f42..499bf8fed 100644 --- a/content/blog/dunia_yetu/index.md +++ b/content/blog/dunia_yetu/index.md @@ -1,7 +1,7 @@ --- id: dunia_yetu -title: Dunia Yetu Formally Announced in Dar Es Salaam -image_caption: Dunia Yetu +title: "Dunia Yetu Formally Announced in Dar Es Salaam" +image_caption: "Dunia Yetu" description: Dunia Yetu (Our World) is a collaborative and co-owned movement to redefine the digital landscape in Tanzania and East Africa, empower coders, spur economic development, and build a self-reliant sovereign digital ecosystem for a better digital future. date: 2024-01-26 taxonomies: From ba32bccb93f9d578aeeebe0c96033b6cb6a3aff6 Mon Sep 17 00:00:00 2001 From: ehab-hassan Date: Fri, 26 Jan 2024 15:51:52 +0200 Subject: [PATCH 2/8] fix build --- start.sh | 59 ++++++++++++-------------------------------------------- 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/start.sh b/start.sh index 50dd0e146..ada9a6c8c 100755 --- a/start.sh +++ b/start.sh @@ -1,59 +1,24 @@ +# builds if executable isn't foound +if [ ! -f "tailwindcss" ] +then + sh build.sh -set +ex -# Check if tailwindcss is already installed -if command -v tailwindcss &> /dev/null; then - echo "tailwindcss is already installed." -else - # checks OS and architecture for correct release - echo "Installing & building tailwind..." - - ASSET="tailwindcss" - - if [[ "$OSTYPE" == "linux-gnu"* ]]; then - ASSET="$ASSET-linux" - elif [[ "$OSTYPE" == "darwin"* ]]; then - ASSET="$ASSET-macos" - fi - if [[ "$(uname -m)" == "x86_64"* ]]; then - ASSET="$ASSET-x64" - elif [[ "$(uname -m)" == "arm64"* ]]; then - ASSET="$ASSET-arm64" - fi - pushd /tmp - curl -sLO "https://github.com/tailwindlabs/tailwindcss/releases/latest/download/${ASSET}" - chmod +x $ASSET - mv $ASSET /usr/local/bin/tailwindcss - popd fi - -source env.sh - # initialized and configures tailwind if not configured if [ ! -f "tailwind.config.js" ] then - ./tailwindcss init - sed -i '' "s| content: \\[\\],| content: \\['./templates/**/*.html'\\],|g" tailwind.config.js + @@ -12,14 +37,23 @@ then fi # compiles tailwind css & launches locally -# rm -rf public static/css -# ./tailwindcss -i css/index.css -o ./static/css/index.css --watch - -# zola serve & +rm -rf public static/css +./tailwindcss -i css/index.css -o ./static/css/index.css --watch & zola serve & # compiles tailwind css for prod & builds project -# ./tailwindcss -i css/index.css -o ./static/css/index.css --minify -# zola build +./tailwindcss -i css/index.css -o ./static/css/index.css --minify +zola build -# # kills zola and tw bg processes on interrupt -# trap 'kill $(jobs -p); exit 1' INT -# wait - - -rm -rf public static/css -tailwindcss -i css/index.css -o ./static/css/index.css --minify - -zola build -o ~/Documents/web/$NAME/ - -open ~/Documents/web/$NAME/index.html \ No newline at end of file +# kills zola and tw bg processes on interrupt +trap 'kill $(jobs -p); exit 1' INT +wait \ No newline at end of file From 55cea0b9bfacaa91fdc300607a61ec311b8977ea Mon Sep 17 00:00:00 2001 From: ehab-hassan Date: Fri, 26 Jan 2024 15:55:41 +0200 Subject: [PATCH 3/8] fix build --- start.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 13 deletions(-) diff --git a/start.sh b/start.sh index ada9a6c8c..b15e776bd 100755 --- a/start.sh +++ b/start.sh @@ -1,24 +1,58 @@ -# builds if executable isn't foound -if [ ! -f "tailwindcss" ] -then - sh build.sh - +set +ex +# Check if tailwindcss is already installed +if command -v tailwindcss &> /dev/null; then + echo "tailwindcss is already installed." +else + # checks OS and architecture for correct release + echo "Installing & building tailwind..." + + ASSET="tailwindcss" + + if [[ "$OSTYPE" == "linux-gnu"* ]]; then + ASSET="$ASSET-linux" + elif [[ "$OSTYPE" == "darwin"* ]]; then + ASSET="$ASSET-macos" + fi + if [[ "$(uname -m)" == "x86_64"* ]]; then + ASSET="$ASSET-x64" + elif [[ "$(uname -m)" == "arm64"* ]]; then + ASSET="$ASSET-arm64" + fi + pushd /tmp + curl -sLO "https://github.com/tailwindlabs/tailwindcss/releases/latest/download/${ASSET}" + chmod +x $ASSET + mv $ASSET /usr/local/bin/tailwindcss + popd fi + +source env.sh + # initialized and configures tailwind if not configured if [ ! -f "tailwind.config.js" ] then - @@ -12,14 +37,23 @@ then + ./tailwindcss init + sed -i '' "s| content: \\[\\],| content: \\['./templates/**/*.html'\\],|g" tailwind.config.js fi # compiles tailwind css & launches locally -rm -rf public static/css -./tailwindcss -i css/index.css -o ./static/css/index.css --watch & zola serve & +# rm -rf public static/css +# ./tailwindcss -i css/index.css -o ./static/css/index.css --watch + +# zola serve & # compiles tailwind css for prod & builds project -./tailwindcss -i css/index.css -o ./static/css/index.css --minify -zola build +# ./tailwindcss -i css/index.css -o ./static/css/index.css --minify +# zola build -# kills zola and tw bg processes on interrupt -trap 'kill $(jobs -p); exit 1' INT -wait \ No newline at end of file +# # kills zola and tw bg processes on interrupt +# trap 'kill $(jobs -p); exit 1' INT +# wait + + +rm -rf public static/css +tailwindcss -i css/index.css -o ./static/css/index.css --minify + +zola build -o ~/Documents/web/$NAME/ + +open ~/Documents/web/$NAME/index.html \ No newline at end of file From 81d6623c3691658dbfdc57d4d4b2803bcb2d49b9 Mon Sep 17 00:00:00 2001 From: ehab-hassan Date: Fri, 26 Jan 2024 16:05:17 +0200 Subject: [PATCH 4/8] fix build --- content/blog/dunia_yetu/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/blog/dunia_yetu/index.md b/content/blog/dunia_yetu/index.md index 499bf8fed..b50d503f7 100644 --- a/content/blog/dunia_yetu/index.md +++ b/content/blog/dunia_yetu/index.md @@ -2,7 +2,7 @@ id: dunia_yetu title: "Dunia Yetu Formally Announced in Dar Es Salaam" image_caption: "Dunia Yetu" -description: Dunia Yetu (Our World) is a collaborative and co-owned movement to redefine the digital landscape in Tanzania and East Africa, empower coders, spur economic development, and build a self-reliant sovereign digital ecosystem for a better digital future. +description: Dunia Yetu (Our World) is a collaborative and co-owned movement to redefine the digital landscape in Tanzania and East Africa, empower coders spur economic development, and build a self-reliant sovereign digital ecosystem for a better digital future. date: 2024-01-26 taxonomies: people: [sam_taggart] From 514a89ab778e492831e421fa9597a8cfd99d6fcf Mon Sep 17 00:00:00 2001 From: samaradel Date: Fri, 26 Jan 2024 16:23:29 +0200 Subject: [PATCH 5/8] fix script --- start.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/start.sh b/start.sh index b15e776bd..34af69b2a 100755 --- a/start.sh +++ b/start.sh @@ -24,10 +24,7 @@ else mv $ASSET /usr/local/bin/tailwindcss popd fi - - -source env.sh - +source ./env.sh # initialized and configures tailwind if not configured if [ ! -f "tailwind.config.js" ] then @@ -38,21 +35,14 @@ fi # compiles tailwind css & launches locally # rm -rf public static/css # ./tailwindcss -i css/index.css -o ./static/css/index.css --watch - # zola serve & - # compiles tailwind css for prod & builds project # ./tailwindcss -i css/index.css -o ./static/css/index.css --minify # zola build - # # kills zola and tw bg processes on interrupt # trap 'kill $(jobs -p); exit 1' INT # wait - - rm -rf public static/css tailwindcss -i css/index.css -o ./static/css/index.css --minify - zola build -o ~/Documents/web/$NAME/ - open ~/Documents/web/$NAME/index.html \ No newline at end of file From 76bf925b5202a9123f782707000d653587d86aaf Mon Sep 17 00:00:00 2001 From: Peter Nashaat Date: Sun, 28 Jan 2024 09:19:34 +0200 Subject: [PATCH 6/8] Update tf_update_dev.yml --- .github/workflows/tf_update_dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tf_update_dev.yml b/.github/workflows/tf_update_dev.yml index 786d85c30..3fed1d00c 100644 --- a/.github/workflows/tf_update_dev.yml +++ b/.github/workflows/tf_update_dev.yml @@ -14,9 +14,9 @@ jobs: host: www2.threefold.io username: root key: ${{ secrets.TF_SECRET }} - port: 22 + port: 30422 script: | - cd /opt/www_threefold_io/ + cd websites/www2/www_threefold_io/ git log -1 git fetch git reset --hard origin/development From 380b5bdcb74983e19767e786f679d6102da71e50 Mon Sep 17 00:00:00 2001 From: Peter Nashaat Date: Sun, 28 Jan 2024 09:21:52 +0200 Subject: [PATCH 7/8] Update tf_update_dev.yml --- .github/workflows/tf_update_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tf_update_dev.yml b/.github/workflows/tf_update_dev.yml index 3fed1d00c..84d3bb785 100644 --- a/.github/workflows/tf_update_dev.yml +++ b/.github/workflows/tf_update_dev.yml @@ -12,7 +12,7 @@ jobs: uses: appleboy/ssh-action@master with: host: www2.threefold.io - username: root + username: webuser key: ${{ secrets.TF_SECRET }} port: 30422 script: | From b1966803d4a72afe3285daa05970d469c9fa28df Mon Sep 17 00:00:00 2001 From: Peter Nashaat Date: Sun, 28 Jan 2024 09:31:57 +0200 Subject: [PATCH 8/8] Update tf_update_dev.yml --- .github/workflows/tf_update_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tf_update_dev.yml b/.github/workflows/tf_update_dev.yml index 84d3bb785..ab8c12b5d 100644 --- a/.github/workflows/tf_update_dev.yml +++ b/.github/workflows/tf_update_dev.yml @@ -14,7 +14,7 @@ jobs: host: www2.threefold.io username: webuser key: ${{ secrets.TF_SECRET }} - port: 30422 + port: 34022 script: | cd websites/www2/www_threefold_io/ git log -1