Skip to content

Instantly share code, notes, and snippets.

@ashwin67
Created February 5, 2019 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashwin67/76065e3f95d187b03290bb36f387e3f2 to your computer and use it in GitHub Desktop.
Save ashwin67/76065e3f95d187b03290bb36f387e3f2 to your computer and use it in GitHub Desktop.
Example Circle CI configuration for Jekyll->Firebase push-to-deploy
version: 2
jobs:
Bundle-Install:
docker:
- image: circleci/ruby:2.4
steps:
- run:
name: Install bundle
command: gem install bundler --version=1.17.1
Jekyll-build:
docker:
- image: circleci/ruby:2.4
steps:
- checkout
- run:
name: Install rubygems
command: cd blog && bundle install
- run:
name: Build Jekyll
command: cd blog && bundle exec jekyll build --verbose
- persist_to_workspace:
root: blog
paths:
- _site
Firebase-Install-and-Build:
docker:
- image: circleci/node:7.10
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- run:
name: Copy files from workspace
command: cp -r /tmp/workspace/_site blog
- run:
name: Install Firebase tools if not installed
command: npm install --save-dev firebase-tools@4.2.1
- run:
name: Deploy to Firebase
command: ln -s ./node_modules/.bin/firebase . && ./firebase deploy --token=$FIREBASE_TOKEN
--non-interactive
workflows:
version: 2
Example_Workflow:
jobs:
- Bundle-Install
- Jekyll-build:
requires:
- Bundle-Install
- Firebase-Install-and-Build:
requires:
- Jekyll-build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment