deac59d55a
Add workflow_dispatch-only deploy-app action, deploy-app.sh script, apps/_template for Cursor, and SOUL/README split between static webhook deploy and app compose profiles. Co-authored-by: Cursor <cursoragent@cursor.com>
31 lines
808 B
Bash
Executable File
31 lines
808 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Static deploy only: git pull for public/ and repo files.
|
|
# App build/deploy: .gitea/workflows/deploy-app.yml (workflow_dispatch).
|
|
set -euo pipefail
|
|
|
|
REPO_DIR="/repo"
|
|
BRANCH="${DEPLOY_BRANCH:-main}"
|
|
HTTPS_URL="${DEPLOY_GIT_URL:-https://gitea.schwenk.online/froxxxy/playground.git}"
|
|
|
|
if [ ! -d "${REPO_DIR}/.git" ]; then
|
|
echo "Error: ${REPO_DIR} is not a git repository"
|
|
exit 1
|
|
fi
|
|
|
|
cd "${REPO_DIR}"
|
|
|
|
# Container has no ssh client and no writable $HOME for git config --global
|
|
git_cmd() {
|
|
git -c "safe.directory=${REPO_DIR}" "$@"
|
|
}
|
|
|
|
if [ -n "${DEPLOY_GIT_TOKEN:-}" ]; then
|
|
pull_url="https://oauth2:${DEPLOY_GIT_TOKEN}@gitea.schwenk.online/froxxxy/playground.git"
|
|
else
|
|
pull_url="${HTTPS_URL}"
|
|
fi
|
|
|
|
git_cmd pull "${pull_url}" "${BRANCH}"
|
|
|
|
echo "Deploy pull completed for ${BRANCH}"
|