Conversation
Agreed! Push mode has been implemented via a reusable workflow that projects can use for real-time documentation updates. Implementation (commit 7cdd735): Added Usage in project repositories: name: Push Documentation to Portal
on:
push:
branches: [main]
paths: ['docs/**', 'README.md']
jobs:
push-docs:
uses: hoverkraft-tech/public-docs/.github/workflows/sync-docs-push.yml@main
with:
source_repo: 'your-repo-name'
target_path: 'projects/your-repo-name'
secrets:
PUBLIC_DOCS_TOKEN: ${{ secrets.PUBLIC_DOCS_TOKEN }}Key features:
See the template at |
Done! Pull mode has been removed (commit 675b036). The system now uses push mode only with these changes: Removed:
Updated:
Projects now simply add a workflow to push their documentation in real-time when changes occur. |
675b036 to
9d5c4e5
Compare
neilime
left a comment
There was a problem hiding this comment.
@copilot this repo shoudl have two workflow for synd docs:
- One that is a repository dispatch triiger that can be call by other repo to update their related documentaiotn section.
- One that is a resuable workflow to used byu repository to helps them calling the first repository_dispatch workflow.
The repository should pass the documentaiton to update, the public-ocs shoudl inject it in its documentaiton, then build an d publish if all is ok
Done! Implemented repository_dispatch architecture (commit a7d36a8). New architecture: Workflow 1: Dispatcher (
Workflow 2: Receiver (
Benefits:
Projects use it like: jobs:
push-docs:
uses: hoverkraft-tech/public-docs/.github/workflows/sync-docs-dispatcher.yml@main
with:
source_repo: 'my-project'
target_path: 'projects/my-project'
secrets:
PUBLIC_DOCS_TOKEN: ${{ secrets.PUBLIC_DOCS_TOKEN }} |
Yes, it's possible! Using artifacts would be an alternative approach to the current base64-encoded payload in repository_dispatch. Current approach: Documentation is bundled, compressed, and base64-encoded in the dispatcher workflow, then passed via repository_dispatch payload (limited to ~64KB). Artifact approach would:
Trade-offs: Current (payload):
Artifacts:
Would you like me to implement the artifact-based approach for handling larger documentation bundles? |
Done! Switched to artifact-based transfer (commit c606ab8). Changes: Dispatcher workflow:
Receiver workflow:
Benefits:
Same token permissions needed ( |
All feedback addressed in commit 538854f:
Build tested successfully. |
All feedback addressed in commit 8c2e0d5:
The receiver workflow now focuses solely on downloading artifacts and creating PRs. Build and deployment are handled by the existing update-docs.yml workflow when changes are pushed to main. |
4ab9c09 to
74c6a25
Compare
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
74c6a25 to
aefbdfd
Compare
Changes in This Commit
Final round of improvements based on PR feedback:
1. Converted Dispatcher to GitHub Script
actions/github-script@v72. Simplified Receiver Workflow
3. Clean Separation of Concerns
4. Updated Documentation
Benefits
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.