Jeffrey Vandenborne

🌊 Don’t go with the flow, be the flow

I am a developer, system administrator and an advocate for efficient and robust software/systems. I like to explore, learn, spend quality time with loved ones and raise awareness about things that affect all of us.

defmodule Deploy do
  defp run_cmd(command, args, options \\ []) do
    System.cmd(command, args, [into: IO.stream(:stdio, :line)] ++ options)
  end

  defp build(source) do
    run_cmd("hugo", [], cd: source)
    Path.join(source, "public")
  end

  defp rsync(source, remote) do
    run_cmd("rsync", ["-avz", "--delete", source, remote])
  end

  def blog do
    "~/devel/blog"
    |> Path.expand()
    |> build()
    |> rsync("jeffrey.vandenborne.co:/var/www/blog")
  end
end

Deploy.blog()

This website was created using Hugo and deployed using the snippet above.


Blog