🛠 Tools used:
- 🤖 CI/CD manager: Github actions
- 📦 Package manager, 🧪 test runner, 🖥 live server, ⚙ bundler & 🔨 compiler: bun
- 📚 Changelog generator: cliff
- ⌨ Commit convention / formatter: conventional commits / husky
⌨ Auto formatted commits & auto-changelog
- This repo uses a simple commit convention, which gets automatically formatted properly and also used to generate a changelog
💡 INFO: Commit message should be composed like this:
action|context|detailsExample: commit
fix ajax used wrong ajax urlwill become🐛 Fix(ajax): used wrong ajax url,
it will also be added into 🐛 Bug fixes section inside latest version of changelog automatically (seeCHANGELOG.md)
🚀 Auto install, build & deploy with CI/CD (based on branches)
- Automatically install assets (from managers like node modules... using bun action)
- Automatically push code on remote servers (using correct SFTP env based on pull requests / branches)
- Automatically configure IP whitelisting on hosting (specific to o2switch hosting)
- Automatically trigger 3rd party actions post deploy (auto clear cache...)
🔍 Project quick view (badges)
- See deploy states per environment (failed, success...)
🎢 Quick launch a WP server (docker is mandatory)
- Update content of
.wp-env.jsonwith your preferences (php version, theme, plugins...) - Use
wp-envscripts like:bun run wp:start/bun run wp:stop - More informations about wp-env here
-
Clone this repository (using "Use template" or directly with
https|ssh|zip) -
Install package manager (optional if
bunis already installed)
curl -fsSL https://bun.sh/install | bash- Install git hooks manager (optional if
package.jsonalready haspreparescript)
bunx husky install- Update continuous integration config files (Github readme, actions...)
-
Edit deployment files paths located in:
.github/workflows/deploy-preprod.yml.github/workflows/deploy-prod.yml
-
Set repository secrets below in repository settings:
PREPROD_FTP_HOST = (example.com) PREPROD_FTP_USER = (johndoe) PREPROD_FTP_PASS = (not123) PROD_FTP_HOST = (example.com) PROD_FTP_USER = (johndoe) PROD_FTP_PASS = (not123)
- Copy code below into
.github/README.mdand change repository paths!
# Project
### Status

- Install scripts
bun i- Run scripts (from
package.json)
bun run script-name- Build assets
bun run build ./index.js --outdir ./build- Spin up a static server on
localhost:5000
bunx serve folder-name- Run tests
bun testForce lint commits messages using commitlint?Automatically generate a changelog based on commits using Git Cliff?