You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
push the tag git push origin <whatever, e.g. v0.2.2>
on the server, get to the main repo root e.g. cd ~/MusicCPRFrontEndDev
pull on server git pull
checkout a new worktree for the recently pushed/fetched/tagged version git worktree add ../fe-dev-versions/v0.2.2 v0.2.2
npm i #beware that probably we should not track package-lock.json nor yarn.lock since local and remote are different platforms and we depend on platform-specific tools /-:
create .env.local and .env.production with content like this (and look at what we're using already on server)
SECRET=<RANDOM STRING>
npm run build
pm2 stop fe-dev
change the symlink for live in fe-dev to the newly readied version
cd /home/ec2-user/fe-dev-versions
ls -al
rm live
ln -s /home/ec2-user/fe-dev-versions/<v0.2.2> live
cd /home/ec2-user/fe-dev-versions/live #WARNING: you must have cd'ed into the current version first because the start script is just running next start which expects to find package.json and etc in the current dir.