From 9176c395f469257c6a53312a10f2bc38606af687 Mon Sep 17 00:00:00 2001 From: Evan Hemsley Date: Sat, 18 Jul 2020 03:20:49 -0700 Subject: [PATCH] switch to droneCI --- .circleci/config.yml | 46 ----------------------------------------- .drone.yml | 30 +++++++++++++++++++++++++++ config.toml | 4 ++-- themes/hugo-theme-learn | 2 +- 4 files changed, 33 insertions(+), 49 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .drone.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index f898087..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,46 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: cibuilds/hugo:0.57 - working_directory: ~/project - environment: - BRANCH: master - TARGET_REPO: moontools-docs/moontools-docs.github.io.git - DOCS_CHECKOUT_DIR: ~/docs - HUGO_BUILD_DIR: ~/build - steps: - - checkout - - run: - command: git submodule sync && git submodule update --init - - run: - name: "Run Hugo" - command: HUGO_ENV=production hugo -v -d $HUGO_BUILD_DIR - - deploy: - name: "Deploy website" - command: | - if [ "${CIRCLE_BRANCH}" = "master" ]; then - echo -e "Starting to deploy to Github Pages\n" - cd ~/project - git config --global user.email "builds@circleci.com" - git config --global user.name "CircleCI" - #using token clone gh-pages branch - git clone --quiet --branch=$CIRCLE_BRANCH https://${GH_TOKEN}@github.com/$TARGET_REPO $DOCS_CHECKOUT_DIR > /dev/null - #rsync - echo "rsync built code with checked out code..." - rsync -a --exclude=.git --delete $HUGO_BUILD_DIR/ $DOCS_CHECKOUT_DIR/bonk - #add, commit and push files - echo "add files to git..." - cd $DOCS_CHECKOUT_DIR - git add --all - echo "commit files to git repository..." - if git commit -m "CircleCI build $CIRCLE_BUILD_NUM pushed to Github Pages" ; then - echo "git push files with force..." - git push -fq origin $BRANCH > /dev/null - echo -e "Deploy completed\n" - else - echo "Content not changed, nothing to deploy" - fi - else - echo "Not master branch, dry run only" - fi diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..c9679f7 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,30 @@ +kind: pipeline +type: docker +name: default + +steps: +- name: submodules + image: alpine/git + commands: + - git submodule update --recursive --init + +- name: build + image: plugins/hugo + settings: + validate: true + url: http://moonside.games/docs/bonk + +- name: deploy + image: drillster/drone-rsync + settings: + hosts: + - moonside.games + target: /var/www/html/docs/bonk + source: public/ + recursive: true + user: hugo + key: + from_secret: rsync_key + when: + branch: + - main diff --git a/config.toml b/config.toml index 688f958..c413ad2 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ -baseURL = "https://moontools-docs.github.io/bonk/" +baseURL = "http://moonside.games/docs/bonk/" languageCode = "en-us" title = "Bonk Docs" theme = "hugo-theme-learn" @@ -8,4 +8,4 @@ home = ["HTML", "RSS", "JSON"] [params] themeVariant = "bonk" -author = "Evan Hemsley" \ No newline at end of file +author = "Evan Hemsley" diff --git a/themes/hugo-theme-learn b/themes/hugo-theme-learn index b85d51a..3efb327 160000 --- a/themes/hugo-theme-learn +++ b/themes/hugo-theme-learn @@ -1 +1 @@ -Subproject commit b85d51a051745cf12e3a45ce61b4b0c747c5ea4a +Subproject commit 3efb32712c5cc77e644852d13ce3525780374b10