Skip to content

Commit

Permalink
Adjust build-docs/action to make /docs dir if it doesn't exist (#42)
Browse files Browse the repository at this point in the history
## Problem

Since `/docs` doesn't exist, the GH action `build-docs/action` cannot
run.

## Solution

Change file to check if `/docs` exists first; if it doesn't, create it;
if it does, move on.

## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
- [x] Infrastructure change (CI configs, etc)
- [x] Non-code change (docs, etc)
- [ ] None of the above: (explain here)

## Test Plan

CI passes.
  • Loading branch information
aulorbe authored Jul 16, 2024
1 parent 6c4269d commit 454cfbf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/actions/build-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ runs:
using: 'composite'
steps:
- name: Write html file to docs directory
shell: bash
run: |
# Check if the ./docs directory exists
if [ -d "./docs" ]; then
echo "Directory ./docs exists."
else
echo "Directory ./docs does not exist. Creating it now..."
mkdir ./docs
fi
# Run the godoc command
godoc -url pkg/github.com/pinecone-io/go-pinecone/pinecone/ > ./docs/index.html
shell: bash
echo "godoc command has been executed and the output has been saved to ./docs/index.html"

0 comments on commit 454cfbf

Please sign in to comment.