Version 1.0.0-rc4 - Pipeline Confirmation
All checks were successful
Frontend Deployment / deploy-frontend (push) Successful in 31s
All checks were successful
Frontend Deployment / deploy-frontend (push) Successful in 31s
This commit is contained in:
@@ -24,22 +24,18 @@ jobs:
|
||||
ssh raphix@alpha.raphix.fr "
|
||||
set -e;
|
||||
APP_DIR=/home/gitlab-ci/chopin-frontend;
|
||||
FRONTEND_DIR=/home/gitlab-ci/frontend/dist;
|
||||
REPO_URL=https://git.raphix.fr/subsonics/chopin-frontend;
|
||||
BRANCH=main;
|
||||
|
||||
echo '[Frontend-Deploy] - START';
|
||||
|
||||
# Nettoyage ancien dossier temporaire
|
||||
rm -rf \$APP_DIR;
|
||||
mkdir -p \$APP_DIR;
|
||||
|
||||
if [ ! -d \$APP_DIR/.git ]; then
|
||||
echo 'Cloning repository...';
|
||||
git clone -b \$BRANCH \$REPO_URL \$APP_DIR;
|
||||
else
|
||||
echo 'Updating repository...';
|
||||
cd \$APP_DIR;
|
||||
git fetch origin;
|
||||
git reset --hard origin/\$BRANCH;
|
||||
fi;
|
||||
|
||||
cd \$APP_DIR;
|
||||
|
||||
@@ -49,5 +45,13 @@ jobs:
|
||||
echo 'Building app...';
|
||||
npm run build;
|
||||
|
||||
echo 'Deploying build to frontend/dist...';
|
||||
mkdir -p \$FRONTEND_DIR;
|
||||
rm -rf \$FRONTEND_DIR/*;
|
||||
cp -r dist/* \$FRONTEND_DIR/;
|
||||
|
||||
echo 'Cleaning up temporary build directory...';
|
||||
rm -rf \$APP_DIR;
|
||||
|
||||
echo '[Frontend-Deploy] - DONE';
|
||||
"
|
||||
|
Reference in New Issue
Block a user