From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: run shell command after publishing project Date: Fri, 8 Dec 2017 14:28:21 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e0826f6640cbdc9055fd9304b" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNOJt-0003xD-DA for emacs-orgmode@gnu.org; Fri, 08 Dec 2017 14:28:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNOJs-0003ui-Cp for emacs-orgmode@gnu.org; Fri, 08 Dec 2017 14:28:25 -0500 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]:35189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eNOJs-0003tx-5x for emacs-orgmode@gnu.org; Fri, 08 Dec 2017 14:28:24 -0500 Received: by mail-pf0-x230.google.com with SMTP id j124so7946118pfc.2 for ; Fri, 08 Dec 2017 11:28:23 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode --089e0826f6640cbdc9055fd9304b Content-Type: text/plain; charset="UTF-8" Hi everyone, Feeling a little rude after a long absence in which I dropped all my non-work commitments -- but still here to ask a question! I'm setting up a new workflow using Kauhsal's ox-hugo. I keep all my course materials in a few org files & publish to hugo-flavoured markdown. My source materials live in one git repo, and my website in another. After exporting any of my my courses to the local hugo directory, I'd like to run a shell script that I'll keep in my org-files directory. That script - cds to the website repo directory, commits changes to the website master branch, - runs hugo, - switches to the "public" directory of compiled html pages, which has a worktree checked out to the gh-pages branch, - commits changes there as well, and then - pushes both branches to github. The script seems to work OK, and now I would like to run it every time I export from the appropriate projects. Is there a good way for me to do this? I guess a hook that only runs under certain conditions? If I can get this to work, and then also auto export every time I commit the org-files to master (maybe with a post-commit git hook of ~emacsclient -e '(org-publish-project "course1"~ ?), then I will maybe be almost happy! thanks as always, matt --089e0826f6640cbdc9055fd9304b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi everyone,
Feeling a little rude after a = long absence in which I dropped all my non-work commitments -- but still he= re to ask a question!

I'm setting up a new wor= kflow using Kauhsal's ox-hugo.=C2=A0 I keep all my course materials in = a few org files & publish to hugo-flavoured markdown.=C2=A0 My source m= aterials live in one git repo, and my website in another.=C2=A0 After expor= ting any of my my courses to the local hugo directory, I'd like to run = a shell script that I'll keep in my org-files directory.=C2=A0

That script
- cds to the website repo = directory, commits changes to the website master branch, - runs hugo,
<= /div>
- switches to the "public" directory of compiled html p= ages, which has a worktree checked out to=C2=A0 the=C2=A0 gh-pages branch, =
- commits changes there as well, and then
- p= ushes both branches to github.=C2=A0

The scri= pt seems to work OK, and now I would like to run it every time I export fro= m the appropriate projects. Is there a good way for me to do this? I guess = a hook that only runs under certain conditions?

If= I can get this to work, and then also auto export every time I commit the = org-files to master (maybe with a post-commit git hook of ~emacsclient -e &= #39;(org-publish-project "course1"~ ?), then I will maybe be almo= st happy!

thanks as always,
matt

--089e0826f6640cbdc9055fd9304b--