Adds a Russian version (data/resume.ru.json, default language) with an RU/EN switch stored under the key shared with the front page and the portfolio. The top bar becomes the site-wide one (brand, Resume, Portfolio, Gitea, Contact, language, theme) with a second row of anchors for this page's sections, and the fonts move to Unbounded and Onest so the three pages share one type system. Portfolio links now point at /portfolio/. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtcZtnG4GQA1d6mW5PNrS9
33 lines
1.3 KiB
Bash
Executable File
33 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build the site and publish it at https://shanaty.ru/resume/ (Gitea/Caddy server).
|
|
#
|
|
# The text and project list are NOT baked into the build: the page reads /data/resume.json, which the
|
|
# server rebuilds every minute from data/resume.json in the Gitea repo plus the repos tagged `resume`.
|
|
# So redeploy only after changing code or styles; content changes just need a push to Gitea.
|
|
# The site is uploaded to a temp dir and swapped in, so it is never half-updated.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
HOST="${GT2GH_HOST:-root@135.106.198.222}"
|
|
KEY="${GT2GH_KEY:-$HOME/.ssh/MyGitea}"
|
|
SITE_DIR=/opt/gitea/site
|
|
|
|
[ -r "$KEY" ] || { echo "deploy: ssh key not found: $KEY" >&2; exit 1; }
|
|
|
|
rm -rf .next out
|
|
BASE_PATH=/resume NEXT_PUBLIC_DATA_URL=/data/resume.json NEXT_PUBLIC_SITE_ORIGIN= npm run build
|
|
[ -f out/index.html ] || { echo "deploy: build failed (out/index.html missing)" >&2; exit 1; }
|
|
|
|
tar -C out -c . | ssh -i "$KEY" -o IgnoreUnknown=WarnWeakCrypto -o WarnWeakCrypto=no "$HOST" "
|
|
set -e
|
|
cd $SITE_DIR
|
|
rm -rf .resume.new .resume.old
|
|
mkdir .resume.new
|
|
tar -x -C .resume.new --no-same-owner
|
|
chmod -R a+rX .resume.new
|
|
if [ -d resume ]; then mv resume .resume.old; fi
|
|
mv .resume.new resume
|
|
rm -rf .resume.old
|
|
"
|
|
echo "Deployed: https://shanaty.ru/resume/"
|