Skip to content

Commit

Permalink
chore: add gh-pages target
Browse files Browse the repository at this point in the history
  • Loading branch information
sgibb committed Dec 12, 2023
1 parent 3ae9ac4 commit 5d08920
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RMD=$(wildcard $(SECTIONDIR)/*.Rmd)

DATE=$(shell date +'%Y%m%d')
GITHEAD=$(shell git rev-parse --short HEAD)
GITHEADL=$(shell git rev-parse HEAD)

.DELETE_ON_ERROR:

Expand Down Expand Up @@ -59,6 +60,18 @@ regenerate-data: \
shell --manifest=guix/manifest-data-preparation.scm -- \
Rscript data/scripts/01-anonymize-and-prepare.R

gh-pages: manuscript
git checkout gh-pages
sed 's#</h4>#</h4> \
<div style="background-color: \#ffc107; padding: 10px; text-align: center;"> \
<strong>This manuscript is work-in-progress!</strong><br /> \
Please find details at <a href="https://github.com/umg-minai/crt">https://github.com/umg-minai/crt</a>.<br /> \
Manuscript date: $(shell date +"%Y-%m-%d %H:%M"); Version: <a href="https://github.com/umg-minai/crt/commit/$(GITHEADL)">$(GITHEAD)</a> \
</div>#' $(OUTPUTDIR)/$(MANUSCRIPT).html > index.html
git add index.html
git commit -m "chore: update index.html"
git checkout main

clean: clean-dist clean-output

clean-dist:
Expand Down

0 comments on commit 5d08920

Please sign in to comment.