Merge pull request 'fix: use HTTPS for production repository fetches' (#41) from fix/deploy-https-remote into main
This commit was merged in pull request #41.
This commit is contained in:
@@ -69,7 +69,7 @@ jobs:
|
||||
set -Eeuo pipefail
|
||||
|
||||
PROJECT="/www/wwwroot/Hulumath-Web"
|
||||
REPOSITORY_URL="http://117.72.28.96:8765/Jacky/Hulumath-Web.git"
|
||||
REPOSITORY_URL="https://git.jacky0987.xyz/Jacky/Hulumath-Web.git"
|
||||
PYTHON_BIN="/www/server/pyporject_evn/versions/3.12.13/bin/python3"
|
||||
|
||||
exec 9>/tmp/hulumath-production-deploy.lock
|
||||
|
||||
@@ -24,7 +24,7 @@ systemd: Gunicorn + UvicornWorker
|
||||
约定:
|
||||
|
||||
- Ubuntu 22.04 或 24.04。
|
||||
- Gitea 仓库:`http://117.72.28.96:8765/Jacky/Hulumath-Web.git`。
|
||||
- Gitea 仓库:`https://git.jacky0987.xyz/Jacky/Hulumath-Web.git`。
|
||||
- 项目目录:`/www/wwwroot/Hulumath-Web`。
|
||||
- 应用监听:`127.0.0.1:8000`。
|
||||
- MySQL 8 宿主机端口:`3307`。
|
||||
@@ -206,7 +206,7 @@ mysql -h 127.0.0.1 -P 3307 \
|
||||
|
||||
```bash
|
||||
git ls-remote \
|
||||
http://117.72.28.96:8765/Jacky/Hulumath-Web.git \
|
||||
https://git.jacky0987.xyz/Jacky/Hulumath-Web.git \
|
||||
refs/heads/main
|
||||
```
|
||||
|
||||
@@ -223,7 +223,7 @@ if [ -d Hulumath-Web ]; then
|
||||
fi
|
||||
|
||||
git clone \
|
||||
http://117.72.28.96:8765/Jacky/Hulumath-Web.git \
|
||||
https://git.jacky0987.xyz/Jacky/Hulumath-Web.git \
|
||||
Hulumath-Web
|
||||
cd Hulumath-Web
|
||||
git checkout main
|
||||
|
||||
+2
-2
@@ -51,7 +51,7 @@ PR 质量门禁由 `.gitea/workflows/ci.yml` 执行:
|
||||
|
||||
自动部署前,服务器必须满足:
|
||||
|
||||
- Gitea 仓库为 `http://117.72.28.96:8765/Jacky/Hulumath-Web.git`。
|
||||
- Gitea 仓库为 `https://git.jacky0987.xyz/Jacky/Hulumath-Web.git`。
|
||||
- 项目目录为 `/www/wwwroot/Hulumath-Web`。
|
||||
- Python 位于 `/www/server/pyporject_evn/versions/3.12.13/bin/python3` 或同目录 `python`。
|
||||
- 已安装 MySQL 8 客户端命令 `mysqldump`。
|
||||
@@ -76,7 +76,7 @@ chmod 600 .env.production
|
||||
|
||||
```bash
|
||||
cd /www/wwwroot/Hulumath-Web
|
||||
git remote set-url origin http://117.72.28.96:8765/Jacky/Hulumath-Web.git
|
||||
git remote set-url origin https://git.jacky0987.xyz/Jacky/Hulumath-Web.git
|
||||
git fetch origin main
|
||||
PREVIOUS_REVISION="$(git rev-parse HEAD)"
|
||||
git reset --hard origin/main
|
||||
|
||||
Reference in New Issue
Block a user