Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup drone.io with publishing on github pages #455

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .circleci/setup-github
Original file line number Diff line number Diff line change
Expand Up @@ -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"
20 changes: 15 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ _site
package-lock.json
node_modules/
.DS_Store
.*

2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down