Compare commits
3 Commits
0e2ed48634
...
c0f00bf301
| Author | SHA1 | Date |
|---|---|---|
|
|
c0f00bf301 | |
|
|
620203f305 | |
|
|
bfafcd114f |
|
|
@ -1 +1,2 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
blog/public
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2021 steven@mineral.town
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
+++
|
||||||
|
+++
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
{{- partial "head.html" . -}}
|
||||||
|
<body>
|
||||||
|
{{- partial "header.html" . -}}
|
||||||
|
<div id="content">
|
||||||
|
{{- block "main" . }}{{- end }}
|
||||||
|
</div>
|
||||||
|
{{- partial "footer.html" . -}}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
name = "mineral"
|
||||||
|
license = "MIT"
|
||||||
|
licenselink = "https://irie.clinic.homo.casa/steven-y-e/friends-of-mineral-town/src/branch/main/blog/themes/mineral/LICENSE"
|
||||||
|
description = "a theme for the blog for friends of mineral town"
|
||||||
|
homepage = "https://blog.mineral.town/"
|
||||||
|
tags = []
|
||||||
|
features = []
|
||||||
|
min_version = "0.41.0"
|
||||||
|
|
||||||
|
[author]
|
||||||
|
name = "steven"
|
||||||
|
homepage = "https://friends.of.mineral.town"
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# The production directory
|
||||||
|
TARGET="/var/www/friends.of.mineral.town"
|
||||||
|
# Local (to server) git repository
|
||||||
|
GIT_DIR="~/mineral.town.git"
|
||||||
|
# A temporary directory for deployment
|
||||||
|
TEMP="~/work"
|
||||||
|
# Name of production branch
|
||||||
|
BRANCH="main"
|
||||||
|
|
||||||
|
while read oldrev newrev ref
|
||||||
|
do
|
||||||
|
# only checking out the deployment branch
|
||||||
|
if [ "$ref" = "refs/heads/$BRANCH" ];
|
||||||
|
then
|
||||||
|
mkdir $TEMP
|
||||||
|
|
||||||
|
echo "Ref $ref received. Deploying ${BRANCH} branch to production..."
|
||||||
|
git --work-tree=$TEMP --git-dir=$GIT_DIR checkout -f $BRANCH
|
||||||
|
|
||||||
|
# build blog
|
||||||
|
cd $TEMP/blog
|
||||||
|
hugo -D
|
||||||
|
|
||||||
|
# Replace production directory with updated project files
|
||||||
|
cd ~
|
||||||
|
rm -rf $TARGET
|
||||||
|
mv $TEMP/ $TARGET/
|
||||||
|
else
|
||||||
|
echo "Ref $ref received. Doing nothing: only the ${BRANCH} branch may be deployed on this server."
|
||||||
|
fi
|
||||||
|
done
|
||||||
Loading…
Reference in New Issue