Publishing Updates
Publishing means taking the latest GitHub version, building it on the server, and copying the static output into Nginx's web root.
Local Workflow
On your computer:
git add .
git commit -m "Update docs"
git push origin master
If GitHub asks for a password, use a GitHub personal access token instead of your account password.
Server Workflow
SSH into the server, then run:
cd /root/home/StreetsDocs
git pull
npm install
npm run build
cp -r build/* /var/www/docs.nextgendevstudios.dev/
systemctl reload nginx
Verify The Live Site
curl -I https://docs.nextgendevstudios.dev
A healthy response looks like:
HTTP/1.1 200 OK
When To Rebuild
Rebuild after changing:
- Any file inside
docs/. sidebars.js.docusaurus.config.js.src/.static/.package.jsonorpackage-lock.json.