2018-01-22 12:55:02 -06:00
|
|
|
version: 2
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
branches:
|
|
|
|
|
only: [master]
|
|
|
|
|
working_directory: /tmp/danielrayjones
|
2019-08-19 09:59:38 -05:00
|
|
|
docker:
|
2023-03-29 14:40:35 -05:00
|
|
|
- image: ruby:2.7
|
2018-01-22 12:55:02 -06:00
|
|
|
steps:
|
2023-03-29 14:11:13 -05:00
|
|
|
- add_ssh_keys:
|
|
|
|
|
fingerprints:
|
|
|
|
|
- "23:c0:43:4c:ae:5b:92:a6:5b:79:92:6b:ca:62:59:8d"
|
2018-01-22 12:55:02 -06:00
|
|
|
- checkout
|
|
|
|
|
- run:
|
|
|
|
|
name: Configure git user
|
|
|
|
|
command: |
|
2018-01-22 13:16:14 -06:00
|
|
|
git config --global user.email "ci@danielrayjones.com"
|
2018-01-22 12:55:02 -06:00
|
|
|
git config --global user.name "Circle CI"
|
|
|
|
|
- run:
|
|
|
|
|
name: Install dependencies
|
2019-08-19 09:59:38 -05:00
|
|
|
command: |
|
|
|
|
|
gem install bundler:2.0.2
|
|
|
|
|
bundle check || bundle install
|
2018-01-22 12:55:02 -06:00
|
|
|
- run:
|
|
|
|
|
name: Creating build directory
|
|
|
|
|
command: git clone -b gh-pages `git remote get-url origin` _site
|
|
|
|
|
- run:
|
|
|
|
|
name: Build site
|
|
|
|
|
command: bundle exec jekyll build
|
|
|
|
|
- run:
|
|
|
|
|
name: No Jekyll
|
|
|
|
|
command: touch _site/.nojekyll
|
|
|
|
|
- run:
|
|
|
|
|
name: Deploy site
|
|
|
|
|
command: |
|
2018-01-22 14:20:09 -06:00
|
|
|
cd _site
|
|
|
|
|
git add -A
|
|
|
|
|
git commit -m "$(date --iso-8601=seconds) Deploy new site"
|
2018-01-22 12:55:02 -06:00
|
|
|
git push
|