diff --git a/.circleci/setup-github b/.circleci/setup-github index 965e650c..1a1aee92 100755 --- a/.circleci/setup-github +++ b/.circleci/setup-github @@ -3,15 +3,10 @@ git config user.name "$USER_NAME" git config user.email "$USER_EMAIL" -git checkout master -git pull origin master - -find . -maxdepth 1 ! -name '_site' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \; -mv _site/* . -rm -R _site/ - -git add -fA +git add -fA _site git commit --allow-empty -m "$(git log develop -1 --pretty=%B)" -git push origin master + +git subtree split --prefix=_site -b gh-publish +git push --force origin gh-publish:master echo "deployed successfully" diff --git a/.drone.yml b/.drone.yml index 6c9b53ae..ad3242b1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,9 +2,19 @@ kind: pipeline type: kubernetes name: default +clone: + depth: 1 + steps: - - name: greeting - image: alpine - commands: - - echo hello - - echo world +- name: build + image: circleci/ruby:2.6.5-node-browsers + commands: + - sudo chmod -R 775 .git + - bin/setup + - bin/build + - .circleci/setup-github + +trigger: + branch: + - develop + - drone-io diff --git a/.gitignore b/.gitignore index 45a96056..26f11e6d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ _site package-lock.json node_modules/ .DS_Store +.* diff --git a/bin/setup b/bin/setup index af759f09..7ec351ab 100755 --- a/bin/setup +++ b/bin/setup @@ -15,7 +15,7 @@ chdir APP_ROOT do # Add necessary setup steps to this file. puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' + system! 'gem install bundler:1.17.3 --conservative' system('bundle check') || system!('bundle install') # Install JavaScript dependencies if using Yarn