-
-
Notifications
You must be signed in to change notification settings - Fork 718
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: fix artifact name mismatch in workflow
- Loading branch information
Showing
2 changed files
with
110 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# Documentation Workflow Enhancement Session | ||
|
||
## Context | ||
Working directory: `/Volumes/My Shared Files/go/src/github.com/tmc/langchaingo/examples` | ||
Target: Enhance GitHub Pages documentation deployment workflow | ||
|
||
## Initial State | ||
- GitHub Actions workflow only deploys from main branch | ||
- Package management conflicts between yarn and npm | ||
- Peer dependency warnings in documentation build | ||
|
||
## Changes Attempted | ||
|
||
### 1. Package Management Cleanup | ||
- Identified duplicate package managers (both package-lock.json and yarn.lock present) | ||
- Attempted to remove package-lock.json to standardize on yarn | ||
- Added missing peer dependencies: | ||
```json | ||
{ | ||
"dependencies": { | ||
"react-loadable": "*", | ||
"@algolia/client-search": "^4.22.1", | ||
"search-insights": "^2.13.0" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.3.3" | ||
} | ||
} | ||
``` | ||
|
||
### 2. Workflow Enhancement | ||
Attempted to modify `.github/workflows/publish-docs.yaml` to: | ||
- Enable deployments on docs-test branch | ||
- Add preview environment | ||
- Maintain production deployments on main branch | ||
|
||
Key changes: | ||
```yaml | ||
deploy: | ||
needs: build | ||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/docs-test' | ||
environment: | ||
name: ${{ github.ref == 'refs/heads/main' && 'github-pages' || 'preview' }} | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
``` | ||
## Issues Encountered | ||
1. Directory Location | ||
- Session started in examples subdirectory | ||
- Limited access to main repository files | ||
- Required relative path navigation (../) for file access | ||
2. Git State Management | ||
- Untracked files in examples/.github | ||
- Challenges with clean git state for commits | ||
- Path resolution issues for workflow file | ||
## Workflow Testing | ||
Latest workflow run on docs-test branch: | ||
- Run ID: 13174827702 | ||
- Status: Success | ||
- Timestamp: 2025-02-06T08:34:37Z | ||
## Next Steps | ||
1. Reopen Cursor in correct directory: | ||
`/Volumes/My Shared Files/go/src/github.com/tmc/langchaingo` | ||
|
||
2. Required Changes: | ||
- Update workflow for preview deployments | ||
- Clean up package management | ||
- Resolve peer dependencies | ||
|
||
3. Testing Plan: | ||
- Verify build on docs-test branch | ||
- Confirm preview environment creation | ||
- Test deployment process | ||
|
||
## Command History | ||
Key commands used: | ||
```bash | ||
# Check git status | ||
git status | ||
# Clean untracked files | ||
rm -rf examples/.github examples/docs | ||
# Check workflow file | ||
git show HEAD:.github/workflows/publish-docs.yaml | ||
# Reset to clean state | ||
git fetch origin && git reset --hard origin/docs-test | ||
``` | ||
|
||
## File Changes Required | ||
1. .github/workflows/publish-docs.yaml | ||
- Add docs-test branch to deployment targets | ||
- Configure preview environment | ||
- Maintain production deployment settings | ||
|
||
2. docs/package.json | ||
- Add missing peer dependencies | ||
- Remove package-lock.json | ||
- Standardize on yarn | ||
|
||
## Notes | ||
- Session preserved in this document for continuation in new workspace | ||
- Unix-style commit messages preferred (following Russ Cox's style) | ||
- GitHub Pages deployment requires proper environment configuration |