From 71f1c493db31c9a1cde36763494f12c516f5338a Mon Sep 17 00:00:00 2001 From: catarrh Date: Mon, 2 Nov 2026 21:11:42 +0300 Subject: [PATCH 1/5] ci: add manual deploy workflow --- .gitea/workflows/deploy.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..7ca5ea3 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,42 @@ +name: deploy +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Show toolchain + run: node -v && npm -v + + - name: Install deploy tools + run: | + apt-get update -qq + apt-get install -y -qq --no-install-recommends rsync openssh-client + + - name: Configure SSH + env: + DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }} + MX_HOST_KEY: ${{ secrets.MX_HOST_KEY }} + run: | + install -m 700 -d ~/.ssh + printf '%s\n' "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519 + printf '%s\n' "$MX_HOST_KEY" > ~/.ssh/known_hosts + chmod 600 ~/.ssh/id_ed25519 ~/.ssh/known_hosts + + - name: Build frontend + run: | + cd frontend + npm ci + npm run build:prod + + - name: Deploy + run: | + set -euo pipefail + REL="$(date -u +%Y%m%dT%H%M%SZ)-$(printf %s "$GITHUB_SHA" | cut -c1-7)" + rsync -a --exclude=node_modules --exclude=.git \ + --link-dest=/var/www/simple/current \ + frontend/ deploy@10.8.0.1:/var/www/simple/releases/"$REL"/ + ssh deploy@10.8.0.1 "deploy-site simple $REL" From 2115bdb6ddc28e1fb0b115f6d250daf9f09726ae Mon Sep 17 00:00:00 2001 From: catarrh Date: Mon, 2 Nov 2026 21:23:18 +0300 Subject: [PATCH 2/5] ci: add manual deploy workflow --- .gitea/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 7ca5ea3..59a827a 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -14,7 +14,7 @@ jobs: - name: Install deploy tools run: | apt-get update -qq - apt-get install -y -qq --no-install-recommends rsync openssh-client + apt-get install -y -qq --no-install-recommends rsync openssh-client git - name: Configure SSH env: From 26ffe6de14dedc1119d9b079c75e42f185109ab6 Mon Sep 17 00:00:00 2001 From: catarrh Date: Mon, 2 Nov 2026 21:25:12 +0300 Subject: [PATCH 3/5] ci: add manual deploy workflow --- .gitea/workflows/deploy.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 59a827a..ec73e17 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -6,16 +6,16 @@ jobs: deploy: runs-on: ubuntu-latest steps: + - name: Install deploy tools + run: | + apt-get update -qq + apt-get install -y -qq --no-install-recommends git rsync openssh-client + - uses: actions/checkout@v4 - name: Show toolchain run: node -v && npm -v - - name: Install deploy tools - run: | - apt-get update -qq - apt-get install -y -qq --no-install-recommends rsync openssh-client git - - name: Configure SSH env: DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }} From a32e9b49396a4249e6ea4269d59cc129db9dd262 Mon Sep 17 00:00:00 2001 From: catarrh Date: Mon, 2 Nov 2026 21:27:33 +0300 Subject: [PATCH 4/5] ci: add manual deploy workflow --- .gitea/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index ec73e17..fae87a9 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -8,8 +8,8 @@ jobs: steps: - name: Install deploy tools run: | - apt-get update -qq - apt-get install -y -qq --no-install-recommends git rsync openssh-client + apt-get -o Acquire::ForceIPv4=true update -qq + apt-get -o Acquire::ForceIPv4=true install -y -qq --no-install-recommends git rsync openssh-client - uses: actions/checkout@v4 From 5181cdf1c4f43cd22ba1dc2bd812c517ac6e4739 Mon Sep 17 00:00:00 2001 From: catarrh Date: Mon, 2 Nov 2026 21:35:59 +0300 Subject: [PATCH 5/5] ci: add manual deploy workflow --- .gitea/workflows/deploy.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index fae87a9..f35bff7 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -6,11 +6,6 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - name: Install deploy tools - run: | - apt-get -o Acquire::ForceIPv4=true update -qq - apt-get -o Acquire::ForceIPv4=true install -y -qq --no-install-recommends git rsync openssh-client - - uses: actions/checkout@v4 - name: Show toolchain