Skip to content

Daily Developer Workflow


Daily Push to Staging

# 1. Edit theme files

# 2. See what changed
git status

# 3. Stage all changes
git add .

# 4. Commit with message
git commit -m "feat: describe your change"

# 5. Push → auto deploy
git push origin staging

After push, pipeline runs automatically:

✅ SonarQube Scan   (~1-2 min)
✅ Deploy Staging   (~30-40 sec)
→ https://[client].development.enfection.com updated


Check Pipeline Status

github.com/ChamodTharuka/[project]-wordpress-theme → Actions tab
  • 🟡 Yellow = Running (wait)
  • Green = Success, staging updated
  • Red = Failed, check logs

Commit Message Format

feat: new feature or new section
fix: bug fix
style: CSS / UI changes only
refactor: code cleanup, no functionality change

Examples:

git commit -m "feat: add hero section"
git commit -m "fix: mobile menu not closing"
git commit -m "style: update footer colors"


Feature Branch Workflow (for big changes)

# Start new feature from staging
git checkout staging
git checkout -b feature/header-redesign

# Work on feature...
git add .
git commit -m "feat: header redesign"

# Merge to staging when done
git checkout staging
git merge feature/header-redesign
git push origin staging
# → Auto deploy to staging ✅

# Delete feature branch
git branch -d feature/header-redesign

Useful Git Commands

# See current branch
git branch

# See what changed (not staged yet)
git status

# See full change diff
git diff

# See commit history
git log --oneline

# Undo last commit (keep files)
git reset --soft HEAD~1

# Pull latest from remote
git pull origin staging

SonarQube Scan Failed?

  1. Go to Actions tab → click the failed run → click SonarQube Scan → read the error
  2. Fix the issue in code
  3. Push again:
git add .
git commit -m "fix: resolve sonar issue"
git push origin staging

Production Deploy

When client approves staging → tell DevOps. DevOps merges to main:

DevOps task — developer does NOT push to main

Important Rules

  • Always push to staging branch only
  • Never push directly to main
  • DB/content changes → use All-in-One Migration plugin, not Git