Skip to content

Instantly share code, notes, and snippets.

@acodeninja
Created August 23, 2018 10:36
Show Gist options
  • Save acodeninja/fb082cebec579db50c1b57303a8bbf77 to your computer and use it in GitHub Desktop.
Save acodeninja/fb082cebec579db50c1b57303a8bbf77 to your computer and use it in GitHub Desktop.
A playbook for deploying my jekyll based blog
---
- hosts: all
vars:
location: /var/www/acodeninja.github.io
tasks:
- name: get codebase
git:
repo: https://github.com/acodeninja/acodeninja.github.io.git
dest: "{{ location }}"
- name: ensure binary dependancies are installed
become: true
package:
name: bundler
state: present
- name: update codebase dependancies
bundler:
state: latest
chdir: "{{ location }}/"
- name: build pages
command: bundle exec jekyll build
args:
chdir: "{{ location }}/"
creates: "{{ location }}/_site"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment