-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for reconfiguring AI assistant
- Loading branch information
Showing
2 changed files
with
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Update AI assistant | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- main | ||
- ai-docs-follow-up | ||
|
||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
||
jobs: | ||
update-ai-assistant: | ||
name: Reconfigure OpenAI assistant | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Set environment variables | ||
run: | | ||
if [[ $GITHUB_REF_NAME == refs/tags/* ]]; then | ||
# tag push | ||
echo "ASSISTANT_ENV=prod" >> $GITHUB_ENV | ||
elif [[ $GITHUB_REF_NAME == refs/heads/* ]]; then | ||
# branch push | ||
echo "ASSISTANT_ENV=dev" >> $GITHUB_ENV | ||
fi | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: volta-cli/action@v4 | ||
|
||
- name: Reconfigure assistant | ||
run: | | ||
cd ./hack/assistant-setup | ||
npm install | ||
npm start |
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