deployment versioning
port development versioning to deployment, but using tags instead of short sha
This commit is contained in:
@@ -22,12 +22,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20.19
|
node-version: 20.19
|
||||||
|
|
||||||
- name: Verify Node Environment
|
- name: Verify Local Environment
|
||||||
run: |
|
run: |
|
||||||
which npm
|
which npm
|
||||||
npm -v
|
npm -v
|
||||||
which node
|
which node
|
||||||
node -v
|
node -v
|
||||||
|
which sed
|
||||||
|
sed --version
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
@@ -65,16 +67,20 @@ jobs:
|
|||||||
npm install
|
npm install
|
||||||
chown -R nginx:nginx .
|
chown -R nginx:nginx .
|
||||||
|
|
||||||
- name: Build UI and Fix Permissions
|
- name: Build UI / Update Version / Fix Permissions
|
||||||
run: |
|
run: |
|
||||||
cd /var/www/html/milsim-site-v4/ui
|
cd /var/www/html/milsim-site-v4/ui
|
||||||
npm run build
|
npm run build
|
||||||
|
version=`git describe --abbrev=0 --tags`
|
||||||
|
sed -i "s/VITE_APPLICATION_VERSION=.*/VITE_APPLICATION_VERSION=$version/" .env
|
||||||
chown -R nginx:nginx .
|
chown -R nginx:nginx .
|
||||||
|
|
||||||
- name: Build API and Fix Permissions
|
- name: Build API / Update Version / Fix Permissions
|
||||||
run: |
|
run: |
|
||||||
cd /var/www/html/milsim-site-v4/api
|
cd /var/www/html/milsim-site-v4/api
|
||||||
npm run build
|
npm run build
|
||||||
|
version=`git describe --abbrev=0 --tags`
|
||||||
|
sed -i "s/APPLICATION_VERSION=.*/APPLICATION_VERSION=$version/" .env
|
||||||
chown -R nginx:nginx .
|
chown -R nginx:nginx .
|
||||||
|
|
||||||
- name: Reset File Permissions
|
- name: Reset File Permissions
|
||||||
|
|||||||
Reference in New Issue
Block a user