From 50b9924627c5c63145e95f74d73b7d9029808193 Mon Sep 17 00:00:00 2001 From: hizumi Date: Wed, 10 Dec 2025 11:50:07 -0600 Subject: [PATCH] deployment versioning port development versioning to deployment, but using tags instead of short sha --- .gitea/workflows/cd-deploy.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/cd-deploy.yaml b/.gitea/workflows/cd-deploy.yaml index cd5155b..5226a98 100644 --- a/.gitea/workflows/cd-deploy.yaml +++ b/.gitea/workflows/cd-deploy.yaml @@ -22,12 +22,14 @@ jobs: with: node-version: 20.19 - - name: Verify Node Environment + - name: Verify Local Environment run: | which npm npm -v which node node -v + which sed + sed --version - name: Checkout uses: actions/checkout@v5 @@ -65,16 +67,20 @@ jobs: npm install chown -R nginx:nginx . - - name: Build UI and Fix Permissions + - name: Build UI / Update Version / Fix Permissions run: | cd /var/www/html/milsim-site-v4/ui npm run build + version=`git describe --abbrev=0 --tags` + sed -i "s/VITE_APPLICATION_VERSION=.*/VITE_APPLICATION_VERSION=$version/" .env chown -R nginx:nginx . - - name: Build API and Fix Permissions + - name: Build API / Update Version / Fix Permissions run: | cd /var/www/html/milsim-site-v4/api npm run build + version=`git describe --abbrev=0 --tags` + sed -i "s/APPLICATION_VERSION=.*/APPLICATION_VERSION=$version/" .env chown -R nginx:nginx . - name: Reset File Permissions