pipeline improvement #28
This file contains hidden or 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
| name: Deploy Documentation | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - test | |
| - main | |
| jobs: | |
| deploy_docs: | |
| name: Build and Deploy Docs [${{ github.ref_name }}] | |
| runs-on: ubuntu-latest | |
| container: | |
| image: mckeea/quarto-doc-builder:latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get changed .qmd files on current branch | |
| run: | | |
| git diff --name-only HEAD~1 HEAD | grep -E '\.qmd$' > modified_docs_list.txt | |
| cat modified_docs_list.txt | |
| - name: Generate intros and keywords | |
| uses: addnab/docker-run-action@v3 | |
| with: | |
| image: mckeea/llm-doc-annotator:latest | |
| options: -e GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }} -v ${{ github.workspace }}:/app | |
| run: python .github/scripts/generate_intros_and_keywords.py modified_docs_list.txt | |
| - name: Commit updated LLM cache | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email "actions@github.com" | |
| git add .llm_cache | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit." | |
| else | |
| git commit -m "Update LLM cache [skip ci]" | |
| git push origin HEAD | |
| fi | |
| - name: Build Docs | |
| run: .github/scripts/build-docs.sh | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: _site | |
| target-folder: ${{ github.ref_name }} | |
| clean: true | |
| token: ${{ secrets.GITHUB_TOKEN }} |