Compare commits

12 Commits

Author SHA1 Message Date
edsea
70bde90792 Test new keywords 2025-10-08 22:04:07 +02:00
edsea
f7e691a24c Update keywords
All checks were successful
Deploy (stellaamor) / deploy (push) Successful in 2s
2025-10-08 22:02:57 +02:00
edsea
1b4adde2bb Fix htaccess for NPM
All checks were successful
Deploy (stellaamor) / deploy (push) Successful in 2s
2025-10-08 16:10:37 +02:00
edsea
9217a71d5a Fix build
All checks were successful
Deploy (stellaamor) / deploy (push) Successful in 2s
2025-10-08 12:04:59 +02:00
edsea
de11388a77 Fix build
Some checks failed
Deploy (stellaamor) / deploy (push) Failing after 2s
2025-10-08 11:58:54 +02:00
edsea
9ab5fb67a6 Fix build
Some checks failed
Deploy (stellaamor) / deploy (push) Failing after 1s
2025-10-08 11:55:22 +02:00
edsea
699caf348b Fix build
Some checks failed
Deploy (stellaamor) / deploy (push) Failing after 1s
2025-10-08 11:41:07 +02:00
edsea
9abdf38a8a Fix build
Some checks failed
Deploy (stellaamor) / deploy (push) Failing after 0s
2025-10-08 11:38:37 +02:00
edsea
0183f4d027 Fix build 2025-10-08 11:35:10 +02:00
edsea
9d2cb407ff Fix build 2025-10-08 11:33:42 +02:00
edsea
63ee007a48 Fix build
Some checks are pending
Deploy (stellaamor) / deploy (push) Waiting to run
2025-10-08 11:26:46 +02:00
edsea
adf6e3a5b2 First build
Some checks failed
Deploy (stellaamor) / deploy (push) Has been cancelled
2025-10-08 11:12:14 +02:00
4 changed files with 75 additions and 13 deletions

View File

@@ -1,16 +1,36 @@
name: Deploy (stellaamor)
on:
push:
branches: [ "main" ]
jobs:
deploy:
runs-on: [ mainhost ] # keep your labels as-is
runs-on: [ mainhost ] # must match your runner label (e.g. mainhost:host)
env:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY_PATH: /home/gitea-runner/.ssh/deploy_stellaamor
SSH_OPTS: "-o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o ConnectTimeout=20 -o StrictHostKeyChecking=no"
SSH_OPTS: >-
-F /dev/null
-o IdentitiesOnly=yes
-o IdentityAgent=none
-o PreferredAuthentications=publickey
-o PubkeyAuthentication=yes
-o PasswordAuthentication=no
-o NumberOfPasswordPrompts=0
-o BatchMode=yes
-o ServerAliveInterval=15
-o ServerAliveCountMax=3
-o ConnectTimeout=20
-o StrictHostKeyChecking=no
APP_ROOT: /var/www/stellaamor
UPLOADS_DIR: uploads
KEEP_N: "5"
HEALTH_URL: https://stellaamor.com/
SERVICE_RELOAD: "systemctl reload apache2 || true"
SSH_KEY_PATH: /home/gitea-runner/.ssh/id_ed25519
steps:
- name: Checkout (pure git)
@@ -20,7 +40,8 @@ jobs:
git fetch --depth=1 origin "$GITHUB_SHA"
git checkout -q "$GITHUB_SHA"
# (no Write SSH key step — removed)
- name: SSH smoke test
run: ssh $SSH_OPTS -i "$SSH_KEY_PATH" ${SSH_USER}@${SSH_HOST} true
- name: Upload & activate atomically
run: |
@@ -34,18 +55,14 @@ jobs:
CUR="${APP}/current"
UPLOADS="${{ env.UPLOADS_DIR }}"
# build tar outside repo dir then move (avoid tar reading its own output)
tar -czf "$TAR" --exclude-vcs --exclude='./node_modules' --exclude="./${UPLOADS}" --exclude='./release' .
mkdir -p release && mv "$TAR" "release/${REL}.tar.gz"
# ensure layout
ssh $SSH_OPTS -i "$SSH_KEY_PATH" ${SSH_USER}@${SSH_HOST} \
"set -e; sudo install -d -o ${SSH_USER} -g ${SSH_USER} -m 755 ${RELEASES} ${SHARED} ${SHARED}/${UPLOADS}"
"set -e; install -d -m 755 ${RELEASES} ${SHARED} ${SHARED}/${UPLOADS}"
# upload (verbose)
scp $SSH_OPTS -vvv -i "$SSH_KEY_PATH" "release/${REL}.tar.gz" ${SSH_USER}@${SSH_HOST}:/tmp/${REL}.tar.gz
scp -O $SSH_OPTS -vvv -i "$SSH_KEY_PATH" "release/${REL}.tar.gz" ${SSH_USER}@${SSH_HOST}:/tmp/${REL}.tar.gz
# unpack/switch/reload/health/prune
ssh $SSH_OPTS -i "$SSH_KEY_PATH" ${SSH_USER}@${SSH_HOST} '
set -euo pipefail
REL="'${REL}'"; APP="'${APP}'"; SHARED="'${SHARED}'"; RELEASES="'${RELEASES}'"; CUR="'${CUR}'"; UPLOADS="'${UPLOADS}'";

View File

@@ -0,0 +1,47 @@
# manual rollback
on:
workflow_dispatch:
inputs:
steps:
description: "How many releases to roll back (1 = previous)"
default: "1"
jobs:
rollback:
runs-on: [ mainhost ]
env:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY_PATH: /home/gitea-runner/.ssh/id_ed25519
SSH_OPTS: >-
-F /dev/null -o IdentitiesOnly=yes -o IdentityAgent=none
-o PreferredAuthentications=publickey -o PubkeyAuthentication=yes
-o PasswordAuthentication=no -o NumberOfPasswordPrompts=0 -o BatchMode=yes
-o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o ConnectTimeout=20
-o StrictHostKeyChecking=no
APP_ROOT: /var/www/stellaamor
SERVICE_RELOAD: "systemctl reload apache2 || true"
steps:
- name: Roll back symlink to an older release
run: |
set -euo pipefail
APP="${{ env.APP_ROOT }}"
RELEASES="${APP}/releases"
CUR="${APP}/current"
N="${{ github.event.inputs.steps || '1' }}"
# pick target release (1=previous)
TARGET="$(ls -1tr "${RELEASES}" | tail -n +"$((N+1))" | tail -n 1)"
if [ -z "${TARGET}" ]; then
echo "No release found to roll back to."; exit 1
fi
echo "Rolling back to: ${TARGET}"
ssh $SSH_OPTS -i "$SSH_KEY_PATH" ${SSH_USER}@${SSH_HOST} "
set -euo pipefail
APP='${APP}'; RELEASES='${RELEASES}'; CUR='${CUR}'; TARGET='${TARGET}';
[ -d \"\${RELEASES}/\${TARGET}\" ] || { echo 'Target release missing'; exit 1; }
ln -sfn \"\${RELEASES}/\${TARGET}\" \"\${CUR}\"
${SERVICE_RELOAD} >/dev/null 2>&1 || true
"

View File

@@ -2,8 +2,6 @@
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Add trailing slash to URLs (except files and directories)
RewriteCond %{REQUEST_FILENAME} !-f

View File

@@ -5,7 +5,7 @@
<div class="inner-row">
<div class="text-col">
<h1 class="title mb-3">Discover <span class="text-primary">Your Love Story</span> with Stella Amor</h1>
<p class="lead mb-1">Join free today with unique date filters for finance, kinks, lifestyle, and beyond. Start exploring now!</p>
<p class="lead mb-1">Join free today with unique dating filters for finance, kinks, lifestyle, and much more. Start exploring now!</p>
<a href="/register/" class="mb-3 btn btn-dark cta-btn">Sign up today</a>
<p class="login-text">Already have an account? <a href="/login/" class="login-link">Login now</a></p>
</div>