]> danix's work - danix.xyz-2.git/commitdiff
docs: update WORKFLOW.md for production branch deploy + fix hugo.toml gitrepo params
authorDanilo M. <redacted>
Wed, 29 Apr 2026 11:32:15 +0000 (13:32 +0200)
committerDanilo M. <redacted>
Wed, 29 Apr 2026 11:32:15 +0000 (13:32 +0200)
Co-Authored-By: Claude Sonnet 4.6 <redacted>
WORKFLOW.md

index 13a6da3bb51a86d4203a62118c2a9009ac847ef6..f142fcd891834708940deab88a3db9d3d1e2ebfb 100644 (file)
@@ -25,6 +25,8 @@ hugo new content/en/articles/my-new-article/index.md
 git add content/en/articles/my-new-article/
 git commit -m "content: add article 'my-new-article'"
 git push origin master
+# then deploy:
+git checkout production && git merge master && git push origin production && git checkout master
 ```
 
 ### Edit an existing article
@@ -35,6 +37,8 @@ cd ~/Programming/GIT/danix.xyz-hacker-theme
 git add content/en/articles/my-article/index.md
 git commit -m "content: update 'my-article'"
 git push origin master
+# then deploy:
+git checkout production && git merge master && git push origin production && git checkout master
 ```
 
 ### Delete an article
@@ -44,6 +48,8 @@ cd ~/Programming/GIT/danix.xyz-hacker-theme
 git rm -r content/en/articles/my-article/
 git commit -m "content: remove 'my-article'"
 git push origin master
+# then deploy:
+git checkout production && git merge master && git push origin production && git checkout master
 ```
 
 ### Add a static asset (image, font, file)
@@ -55,6 +61,8 @@ cp ~/Downloads/photo.jpg static/images/photo.jpg
 git add static/images/photo.jpg
 git commit -m "content: add photo.jpg"
 git push origin master
+# then deploy:
+git checkout production && git merge master && git push origin production && git checkout master
 ```
 
 ### Update site config (hugo.toml, i18n strings)
@@ -64,6 +72,8 @@ git push origin master
 git add hugo.toml
 git commit -m "config: ..."
 git push origin master
+# then deploy:
+git checkout production && git merge master && git push origin production && git checkout master
 ```
 
 ### Mark an article as obsolete
@@ -173,7 +183,7 @@ git push origin master
 
 ## Production Deployment
 
-Pushing to `danix_git:danix.xyz-2` (master) triggers the `post-receive` hook on the server.
+Pushing to `danix_git:danix.xyz-2` **production branch** triggers the `post-receive` hook on the server. Pushing to `master` alone does NOT deploy.
 
 The hook:
 1. Creates a fresh Hugo site in `/tmp/danix.xyz-compile`
@@ -182,11 +192,17 @@ The hook:
 4. Runs `hugo -t dagreynix --minify`
 5. Publishes to `/var/www/html`
 
+**Deploy workflow:** commit to master first, then merge into production and push:
+
+```bash
+git checkout production && git merge master && git push origin production && git checkout master
+```
+
 **Important:** The hook always clones the current tip of the theme repo — it does NOT use the submodule pointer. This means:
 
-- Pushing a theme change to `danix_git:danix2-hugo-theme` is enough for production to pick it up on the next content deploy.
+- Pushing a theme change to `danix_git:danix2-hugo-theme` is enough for production to pick it up on the next deploy.
 - You do NOT need to bump the submodule pointer to deploy theme changes. The pointer is for local tracking only.
-- If you want to deploy a theme change immediately without a content change, make any trivial commit in the content repo and push it.
+- If you want to deploy a theme change immediately without a content change, make any trivial commit in the content repo, push to master, then merge to production.
 
 ---
 
@@ -270,14 +286,17 @@ ssh danix_git "git -C ~/repositories/danix2-hugo-theme.git log --oneline | head
 # content change → deploy
 cd ~/Programming/GIT/danix.xyz-hacker-theme
 git add <files> && git commit -m "..." && git push origin master
+git checkout production && git merge master && git push origin production && git checkout master
 
 # theme change → deploy
 cd ~/Programming/GIT/danix2-hugo-theme        # or themes/danix-xyz-hacker/
 git checkout master
 git add <files> && git commit -m "..." && git push origin master
-# then bump pointer:
+# then bump pointer in content repo:
 cd ~/Programming/GIT/danix.xyz-hacker-theme
 git add themes/danix-xyz-hacker && git commit -m "chore: bump theme" && git push origin master
+# then deploy:
+git checkout production && git merge master && git push origin production && git checkout master
 
 # check submodule status
 git submodule status