tools/makefile: update HTML export directory name

This commit is contained in:
nodiscc 2023-08-22 15:48:10 +02:00
parent 4d462e38cf
commit 61ceeca387
No known key found for this signature in database
GPG key ID: 067FC4266A4B6909

View file

@ -43,12 +43,12 @@ export_markdown:
.PHONY: export_html # render HTML export from YAML data (https://awesome-selfhosted.net/)
export_html:
rm -rf awesome-selfhosted-html-preview/ html/
rm -rf awesome-selfhosted-html/ html/
git clone https://github.com/$(HTML_REPOSITORY)
mkdir html && source .venv/bin/activate && hecat --config .hecat/export-html.yml
sed -i 's|<a href="https://github.com/pradyunsg/furo">Furo</a>|<a href="https://github.com/nodiscc/hecat/">hecat</a>, <a href="https://www.sphinx-doc.org/">sphinx</a> and <a href="https://github.com/pradyunsg/furo">furo</a>. Content under <a href="https://github.com/awesome-selfhosted/awesome-selfhosted-data/blob/master/LICENSE">CC-BY-SA 3.0</a> license. <a href="https://github.com/awesome-selfhosted/awesome-selfhosted-html">Source code</a>, <a href="https://github.com/awesome-selfhosted/awesome-selfhosted-data">raw data</a>.|' .venv/lib/python*/site-packages/furo/theme/furo/page.html
source .venv/bin/activate && sphinx-build -b html -c .hecat/ html/md/ html/html/
rm -rf html/html/.buildinfo html/html/objects.inv html/html/.doctrees awesome-selfhosted-html-preview/*
rm -rf html/html/.buildinfo html/html/objects.inv html/html/.doctrees awesome-selfhosted-html/*
echo "# please do not scrape this site aggressively. Source code is available at https://github.com/awesome-selfhosted/awesome-selfhosted-html. Raw data is available at https://github.com/awesome-selfhosted/awesome-selfhosted-data" >| html/html/robots.txt
.PHONY: push_markdown # commit and push changes to the markdown repository
@ -62,11 +62,11 @@ push_markdown:
.PHONY: push_html # commit and push changes to the HTML site repository (amend previous commit and force-push)
push_html:
$(eval COMMIT_HASH=$(shell git rev-parse --short HEAD))
mv html/html/* awesome-selfhosted-html-preview/
cd awesome-selfhosted-html-preview/ && git remote set-url origin git@github.com:$(HTML_REPOSITORY)
cd awesome-selfhosted-html-preview/ && git config user.name awesome-selfhosted-bot && git config user.email github-actions@github.com
cd awesome-selfhosted-html-preview/ && git add . && (git diff-index --quiet HEAD || git commit --amend -m "[bot] build HTML from awesome-selfhosted-data $(COMMIT_HASH)")
cd awesome-selfhosted-html-preview/ && git push -f
mv html/html/* awesome-selfhosted-html/
cd awesome-selfhosted-html/ && git remote set-url origin git@github.com:$(HTML_REPOSITORY)
cd awesome-selfhosted-html/ && git config user.name awesome-selfhosted-bot && git config user.email github-actions@github.com
cd awesome-selfhosted-html/ && git add . && (git diff-index --quiet HEAD || git commit --amend -m "[bot] build HTML from awesome-selfhosted-data $(COMMIT_HASH)")
cd awesome-selfhosted-html/ && git push -f
.PHONY: url_check # check URLs for dead links or other connection problems
url_check:
@ -80,7 +80,7 @@ authors:
.PHONY: clean # clean files generated by automated tasks
clean:
rm -rf awesome-selfhosted/ awesome-selfhosted-html-preview/ html/
rm -rf awesome-selfhosted/ awesome-selfhosted-html/ html/
.PHONY: help # generate list of targets with descriptions
help: