From aaae39a9f936370589eb6c655b312c27d84682ab Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 3 Apr 2024 08:22:21 +1100 Subject: [PATCH 1/2] Remove build.sh script We now use github actions to build and deploy the site, this script is unused - remove it. --- build.sh | 77 -------------------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100755 build.sh diff --git a/build.sh b/build.sh deleted file mode 100755 index f2646b7..0000000 --- a/build.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# -# Bulid/deployment script for www.rust-bitcoin.org - -set -e - -root=$(pwd) - -main() { - local _deploy=false - - if [ "$#" -eq 1 ]; then - if [ "$1" = "--deploy" ]; then - _deploy=true - fi - fi - - if [ $_deploy = true ]; then - deploy - else - build - echo "" - echo -e "\033[0;32m Site built, you can serve locally by cd'ing into site/ and running 'hugo serve'...\033[0m" - fi -} - -build() { - # Build the cookbook - cd $root - rm -rf "site/static/book" - cd cookbook - mdbook build --dest-dir "../site/static/book" - cd $root - - # Build the hugo project. - cd site - hugo - cd $root -} - -# Deploy the site to https://github.com/rust-bitcoin/rust-bitcoin.github.io -deploy() { - local _date=$(date --utc) - echo -e "\033[0;32m Deploying site to GitHub...\033[0m" - cd $root - - local branch=$(git rev-parse --abbrev-ref HEAD) - - if [ $branch != "master" ]; then - echo "Not on master branch, must be on master to deploy" - return 1 - fi - - build - - # Commit changes. - cd site/public - git add -A - - msg="Build site `date`" - if [ $# -eq 1 ] - then msg="$1" - fi - git commit -m "$msg" - - # Push html to GitHub pages (see public/.git/config) - git push - - cd $root - echo -e "\033[0;32m Deployment successful\033[0m" -} - -# -# Main -# -main $@ -exit 0 From b9af24a7218a2045ff86fcc99d795f6daeb6edc9 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 3 Apr 2024 08:23:46 +1100 Subject: [PATCH 2/2] Remove stale README This readme file is from the initial stages of development, it is not used now - remove it. --- site/static/README.md | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 site/static/README.md diff --git a/site/static/README.md b/site/static/README.md deleted file mode 100644 index 68cc379..0000000 --- a/site/static/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# rust-bitcoin - -This is the website for the [rust-bitcoin](https://github.com/rust-bitcoin) GitHub organization. The -[source code](https://github.com/tcharding/www.rust-bitcoin.org) is open and PRs are welcome.