danielrayjones/.circleci/config.yml
2023-03-29 13:50:57 -05:00

36 lines
1,003 B
YAML

version: 2
jobs:
build:
branches:
only: [master]
working_directory: /tmp/danielrayjones
docker:
- image: ruby:2.6.3
steps:
- checkout
- run:
name: Configure git user
command: |
git config --global user.email "ci@danielrayjones.com"
git config --global user.name "Circle CI"
- run:
name: Install dependencies
command: |
gem install bundler:2.0.2
bundle check || bundle install
- 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: |
cd _site
git add -A
git commit -m "$(date --iso-8601=seconds) Deploy new site"
git push