diff options
author | Linnea Gräf <nea@nea.moe> | 2024-09-21 00:55:21 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-09-21 00:55:21 +0200 |
commit | 82eabe9fa712c4315b6b4a3349b24fa25c7f7f79 (patch) | |
tree | 03c6ce2236bf1ac2e61b1e6ac810567a31abd2ee | |
parent | a2c193c0272cf942903a9453a9154f28b7a1bd94 (diff) | |
download | moddevwiki-82eabe9fa712c4315b6b4a3349b24fa25c7f7f79.tar.gz moddevwiki-82eabe9fa712c4315b6b4a3349b24fa25c7f7f79.tar.bz2 moddevwiki-82eabe9fa712c4315b6b4a3349b24fa25c7f7f79.zip |
Add manual deploy script
-rwxr-xr-x | .github/workflows/manual-publish.sh | 16 |
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 + |