aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rwxr-xr-x.github/workflows/manual-publish.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/.github/workflows/manual-publish.sh b/.github/workflows/manual-publish.sh
new file mode 100755
index 0000000..381448e
--- /dev/null
+++ b/.github/workflows/manual-publish.sh
@@ -0,0 +1,16 @@
+export SSH_USER="site-deploy"
+export SSH_HOST="nea.moe"
+export GITHUB_SHA="$(git rev-parse HEAD)-$(openssl rand -hex 10)"
+
+venv/bin/mkdocs build
+scp -r site "$SSH_USER"@"$SSH_HOST":~/new-site-content-$GITHUB_SHA
+ssh "$SSH_USER"@"$SSH_HOST" <<EOF
+set -x
+chmod -R g+rw ~/new-site-content-$GITHUB_SHA
+rm -fr /var/www/moddev
+mkdir /var/www/moddev
+mv ~/new-site-content-$GITHUB_SHA/* /var/www/moddev
+chmod -R g+rw /var/www/moddev
+rm -rf ~/new-site-content-$GITHUB_SHA/
+EOF
+