Skip to content

Commit

Permalink
update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraRodgers committed Jul 17, 2024
1 parent 3d72567 commit d30f097
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/generate_docs.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
name: Generate Documentation
name: CI

on:
push:
branches:
- main

jobs:
generate-docs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Git user
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
python-version: 3.x

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Run generate_docs.py
- name: Generate documentation
run: python scripts/generate_docs.py
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
python scripts/generate_docs.py

- name: Commit changes
- name: Commit and push changes
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add .
git commit -m 'Update documentation with code samples and descriptions'
git push origin main
if git diff-index --quiet HEAD; then
echo "No changes to commit"
else
git commit -m "Update documentation with code samples and descriptions"
git push origin main
fi

0 comments on commit d30f097

Please sign in to comment.