ci(pages): scoped auto-deploy of landing → gh-pages#42
Conversation
Adds .github/workflows/deploy-landing.yml: on push to main touching index.html or assets/**, overlay ONLY those paths onto the curated gh-pages branch and push. gh-pages is hand-assembled (forge/, forms/, qdrant-features/, docs/, CNAME=memex.quest, .nojekyll) and is NOT a mirror of main, so the job uses `git checkout origin/main -- index.html assets`, which is additive/update-only and never deletes gh-pages-only files. Verified via a throwaway-worktree dry-run: only index.html + assets/ change; all curated content and CNAME survive untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Walkthroughmain 브랜치의 index.html과 assets 디렉토리 변경을 감지하여 gh-pages 브랜치에만 해당 파일을 선택적으로 동기화하는 GitHub Actions 워크플로를 추가한다. 배포 과정에서 변경이 없으면 조건부로 종료하고, 변경이 있으면 커밋을 생성하여 gh-pages에 푸시하며, 동시성 제어로 중복 배포를 방지한다. ChangesLanding 배포 워크플로
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10분 Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96f2c591c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # ref's tree and never deletes files that exist solely on gh-pages. | ||
| # That makes this purely additive: forge/, forms/, qdrant-features/, | ||
| # docs/, CNAME and .nojekyll are left exactly as curated. | ||
| git checkout origin/main -- index.html assets |
There was a problem hiding this comment.
Remove deleted assets when syncing landing
On a push that deletes or renames a file under assets/, this checkout runs in Git's default overlay mode (git checkout -h lists --[no-]overlay as default), so files that are absent from origin/main remain in the gh-pages worktree and git add index.html assets will not stage their deletion. The workflow will either publish only additions/updates or even report nothing to deploy for a deletion-only change, leaving removed landing assets still live on GitHub Pages; the sync needs a non-overlay checkout or an explicit removal of the landing assets/ tree before restoring it from main while still preserving unrelated curated directories.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/deploy-landing.yml:
- Line 33: The workflow currently uses the mutable tag "uses:
actions/checkout@v4"; replace that with the specific commit SHA of the
actions/checkout v4 release (e.g., "uses: actions/checkout@<commit-sha>") to pin
the action to an immutable reference and improve supply-chain security—locate
the correct SHA from the actions/checkout releases page and update the line
containing "uses: actions/checkout@v4" accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5a0b89c1-b7de-4857-83f2-89c46e12b3a6
📒 Files selected for processing (1)
.github/workflows/deploy-landing.yml
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout (all branches, full history) | ||
| uses: actions/checkout@v4 |
There was a problem hiding this comment.
액션을 SHA로 고정하여 보안 태세를 개선하세요.
현재 actions/checkout@v4는 변경 가능한 태그를 사용합니다. 공급망 공격을 방지하려면 특정 커밋 SHA로 고정하는 것이 권장됩니다.
🔒 SHA 고정 제안
- - name: Checkout (all branches, full history)
- uses: actions/checkout@v4
+ - name: Checkout (all branches, full history)
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0참고: 최신 v4 릴리스의 SHA를 확인하려면 actions/checkout 릴리스를 참조하세요.
🧰 Tools
🪛 zizmor (1.25.2)
[error] 33-33: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/deploy-landing.yml at line 33, The workflow currently uses
the mutable tag "uses: actions/checkout@v4"; replace that with the specific
commit SHA of the actions/checkout v4 release (e.g., "uses:
actions/checkout@<commit-sha>") to pin the action to an immutable reference and
improve supply-chain security—locate the correct SHA from the actions/checkout
releases page and update the line containing "uses: actions/checkout@v4"
accordingly.
What
Adds
.github/workflows/deploy-landing.ymlso the landing publishes itself: whenevermaingets a push that touchesindex.htmlorassets/**, the workflow overlays only those paths onto thegh-pagesbranch and pushes.Why scoped (not a full mirror)
gh-pagesis hand-assembled, not a copy ofmain. It carries content that does not exist onmain:forge/(P01–P26 mockups),forms/,qdrant-features/CNAME=memex.quest,.nojekyllA naive "copy all of main → gh-pages" deploy would delete those + the custom domain. So the job uses:
git switch gh-pages git checkout origin/main -- index.html assets # additive / update-onlygit checkout <ref> -- <path>writes only the paths present in main's tree and never deletes gh-pages-only files — purely additive. Everything curated survives every deploy.Verified (throwaway-worktree dry-run, nothing pushed)
Running the overlay against current
gh-pagesstaged only:index.html→ no change (already in sync)assets/apple-touch-icon.png,favicon-32.png,favicon.ico→ added (currently missing on the live site)assets/screenshots/*.png→ updated (live site still has pre-docs(screenshots): refresh landing + README captures to current UI #39 screenshots)…while
forge/,forms/,qdrant-features/,docs/,CNAME(memex.quest),.nojekyllall stayed present and untouched.So merging this both (a) wires up future auto-deploys and (b) on first run, corrects the stale favicons/screenshots already live.
Safety notes
permissions: contents: write(push to gh-pages), nothing else.concurrencygroup withcancel-in-progress: false→ deploys queue, never interrupt mid-push.workflow_dispatchincluded for manual re-runs.🤖 Generated with Claude Code
Summary by CodeRabbit
릴리스 노트