Personal website built with Jekyll, deployed via GitHub Pages.
Install Ruby via Homebrew (one-time setup):
brew install ruby
echo 'export PATH="/opt/homebrew/opt/ruby/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
gem install bundlerbundle installbundle exec jekyll serveOpen http://localhost:4000/ in your browser. The site auto-rebuilds when you save changes.
For live reload in the browser:
bundle exec jekyll serve --livereloadFor the development of site, I follow the steps below:
- Use some markdown files as draft to write what ever I want;
- Use the AI tools to help me reformat so that it is compatible with the site;
Push to main and the site is live in ~2 minutes. That's it.
The Deploy site GitHub Actions workflow runs automatically on every push to main that touches content files (posts, assets, config, templates, scripts, etc.) and:
- Builds the Jekyll site with
JEKYLL_ENV=production - Purges unused CSS
- Deploys to GitHub Pages via the official
actions/deploy-pagesaction
PRs against main run the build as a check but do not deploy. Pure documentation changes (README.md, etc.) do not trigger a deploy.
Run Prettier to avoid a failing CI check:
npx prettier . --write
git add .
git commit -m "your message"
git pushGo to Actions → Deploy site → Run workflow to trigger a deployment without a commit.
- Go to Settings → Pages and set source to GitHub Actions.
- Go to Settings → Actions → General → Workflow permissions and enable Read and write permissions.
| Command | Description |
|---|---|
bundle install |
Install dependencies |
bundle exec jekyll serve |
Start dev server (localhost:4000) |
bundle exec jekyll serve --livereload |
Start dev server with live reload |
bundle exec jekyll build |
Build site to _site/ |