Skip to content

Commit

Permalink
docs: fix artifact name mismatch in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tmc committed Feb 7, 2025
1 parent 14276aa commit 5d12bcc
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: github-pages
name: github-pages-build
path: docs/build
retention-days: 1

Expand All @@ -63,7 +63,7 @@ jobs:
- name: Download build
uses: actions/download-artifact@v4
with:
name: docusaurus-build
name: github-pages-build
path: build

- name: Setup Pages
Expand Down
108 changes: 108 additions & 0 deletions cursor-composers-session-fixdocs.md
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

0 comments on commit 5d12bcc

Please sign in to comment.