Add CI/CD via Drone (#1)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: https://git.tomaka.onl/atomaka/atomaka.com/pulls/1
This commit is contained in:
parent
d6f80faee6
commit
516791bb33
3 changed files with 53 additions and 7 deletions
51
.drone.yml
Normal file
51
.drone.yml
Normal file
|
@ -0,0 +1,51 @@
|
|||
name: test
|
||||
kind: pipeline
|
||||
|
||||
steps:
|
||||
- name: jekyll-build
|
||||
image: ruby
|
||||
commands:
|
||||
- gem install bundler
|
||||
- bundle install
|
||||
- bundle exec jekyll build
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude: master
|
||||
event: push
|
||||
|
||||
---
|
||||
name: deploy
|
||||
kind: pipeline
|
||||
|
||||
steps:
|
||||
- name: jekyll-build
|
||||
image: ruby
|
||||
commands:
|
||||
- gem install bundler
|
||||
- bundle install
|
||||
- bundle exec jekyll build
|
||||
- name: docker-build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
pull_image: true
|
||||
registry: docker.atomaka.com
|
||||
repo: docker.atomaka.com/atomaka.com
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_TAG}
|
||||
- name: deploy
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host:
|
||||
from_secret: unraid_host
|
||||
username:
|
||||
from_secret: unraid_username
|
||||
key:
|
||||
from_secret: unraid_ssh_key
|
||||
script:
|
||||
- docker pull docker.atomaka.com/atomaka.com:latest
|
||||
- docker restart atomaka.com
|
||||
|
||||
trigger:
|
||||
event: tag
|
7
Makefile
7
Makefile
|
@ -2,13 +2,6 @@ build:
|
|||
bundle exec jekyll build
|
||||
docker build . -t atomaka.com
|
||||
|
||||
push: build
|
||||
docker tag atomaka.com:latest docker.atomaka.com/atomaka.com:latest
|
||||
docker push docker.atomaka.com/atomaka.com:latest
|
||||
|
||||
deploy: push
|
||||
ssh $$SSH_USERNAME@$$SSH_HOST 'docker pull docker.atomaka.com/atomaka.com:latest && docker restart atomaka.com'
|
||||
|
||||
review:
|
||||
docker exec -it atomaka.com sh
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[![Build Status](http://drone.tomaka.onl/api/badges/atomaka/atomaka.com/status.svg)](http://drone.tomaka.onl/atomaka/atomaka.com)
|
||||
|
||||
# atomaka.com
|
||||
|
||||
Website managed by jekyll.
|
||||
|
|
Loading…
Reference in a new issue