Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/693c70a4-9498-8011-87ee-efb5576cc53d
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== # === Location: <syntaxhighlight>~/projects/wsi-website </syntaxhighlight> ===== <syntaxhighlight>wsi-website/ ===== βββ src/ β Your editable source (β CORRECT) β βββ index.html β βββ en/ β βββ zh/ β βββ assets/ β βββ css/tailwind.css βββ site/ β Auto-generated output (β CORRECT) β βββ build-info.json β build-meta.sh writes this βββ tailwind.config.js βββ build-meta.sh βββ package.json βββ .github/workflows/ βββ deploy-website.yml β NEW WEBSITE CI/CD βββ deploy-mkdocs.yml β OLD DOCS CI/CD </syntaxhighlight> ===== 1. npm run build β builds Tailwind β writes metadata to site/build-info.json β regenerates site/ cleanly ===== # Local Git repo is valid: ``<code> git remote -v origin github.com:kce2ces/wsi-website.git <syntaxhighlight>3. Pushed successfully to main β commit e2d3d98 (βRestructure projectβ) Conclusion: LOCAL SIDE = PERFECT === # === Repository: github.com<ref>{{cite web|title=github.com|url=https://github.com/kce2ces/wsi-website|publisher=github.com|access-date=2025-12-20}}</ref> Contains: β Clean source (src/) β Clean build (site/) β CI/CD workflows (deploy-website.yml) β No broken files β No duplicated folders Deployment key setup: * You generated key: /home/kce2ces/.ssh/github-deploy * You added public key to the VPS * You will add the private key into repo secrets as DEPLOY_KEY Conclusion: GITHUB SIDE = READY === # === Workflow file (correct): </syntaxhighlight> .github/workflows/deploy-website.yml <syntaxhighlight> What it does: # Runs on push to main # Installs Node + dependencies # Runs npm run build # Uploads site/* to VPS folder # Restarts Caddy container ===== | | | | ===== | --- | --- | --- | | | | | | | | | | | | | | | | | You must create them under: GitHub β Settings β Secrets β Actions Conclusion: CI/CD WORKFLOW = CORRECT (Just add the 4 secrets.) === # === Your final production directory is: </syntaxhighlight> ~/projects/wsi-website-prod <syntaxhighlight> Contents: </syntaxhighlight> Caddyfile docker-compose.yml site/ <syntaxhighlight> This is correct, clean, and ready. The Caddy root used inside container: </syntaxhighlight> /usr/share/caddy <syntaxhighlight> Your docker-compose.yml binds: </syntaxhighlight> ./site:/usr/share/caddy <syntaxhighlight> Perfect. Conclusion: VPS FOLDER = PERFECT === # === ===== </syntaxhighlight> ===== wsi-caddy <syntaxhighlight> Running with: </syntaxhighlight> expose: * "80" <syntaxhighlight> On network: </syntaxhighlight> npm-net <syntaxhighlight> Because Nginx Proxy Manager is reverse proxying TLS on ports 80/443. Your Caddyfile (correct): </syntaxhighlight> { auto_https off } http://whitestoneintel.com { root * /usr/share/caddy file_server } http://www.whitestoneintel.com { redir http://whitestoneintel.com{uri} } http://wsi.whitestoneintel.com { root * /usr/share/caddy file_server } <syntaxhighlight> Conclusion: CADDY CONFIG = PERFECT FOR NPM SETUP === # === ===== </syntaxhighlight> ===== LOCAL β GIT β CI/CD BUILD β SCP UPLOAD β VPS β CADDY β HTTPS β USER </code>`` ===== 1. You edit any file in src/ on your local ===== # You run npm run build or let CI/CD run it for you # git push # GitHub Actions builds Tailwind # GitHub Actions uploads site/* to VPS # GitHub restarts wsi-caddy # Within 2β3 seconds β whitestoneintel.com shows the update # Footer contains the timestamp + commit ID Everything is now aligned.
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)