Skip to content

Commit

Permalink
Adds publish of docs for non-main-branch
Browse files Browse the repository at this point in the history
This way we can test it out/share
  • Loading branch information
elijahbenizzy committed Sep 25, 2024
1 parent d6f58f6 commit 358d8d2
Show file tree
Hide file tree
Showing 7 changed files with 608 additions and 2 deletions.
33 changes: 32 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@ on:
- main # Triggers the workflow on push events to the main branch
pull_request:
# Triggers the workflow on pull request events for any branch
types: [ opened, synchronize, reopened ]
types: [opened, synchronize, reopened]

permissions:
contents: write
pull-requests: write

concurrency: ci-${{ github.ref }}

jobs:
docs:
runs-on: ubuntu-latest
env:
PR_PATH: pull/${{github.event.number}}
BASE_URL: https://burr.dagworks.io/pull/${{github.event.number}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
Expand All @@ -24,6 +30,15 @@ jobs:
run: |
sphinx-build docs -b dirhtml _build
echo "burr.dagworks.io" > _build/CNAME # keep the cname file which this clobbers -- todo, unhardcode
- name: Comment on PR
uses: hasura/[email protected]
if: github.ref != 'refs/heads/main'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: deploy-preview
message: "Starting deployment of preview ⏳..."
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
Expand All @@ -32,3 +47,19 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
- name: Build PR preview website
uses: peaceiris/actions-gh-pages@v3
if: github.ref != 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
destination_dir: ${{ env.PR_PATH }} # TODO you need to set this if you're using a custom domain. Otherwise you can remove it.
- name: Update comment
uses: hasura/[email protected]
if: github.ref != 'refs/heads/main'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: deploy-preview
message: "A preview of ${{ github.event.after }} is uploaded and can be seen here:\n\n ✨ ${{ env.BASE_URL }} ✨\n\nChanges may take a few minutes to propagate. Since this is a preview of production, content with `draft: true` will not be rendered. The source is here: https://github.com/${{ github.repository }}/tree/gh-pages/${{ env.PR_PATH }}/"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ but realized that it has a wide array of applications and decided to release it

While Burr is stable and well-tested, we have quite a few tools/features on our roadmap!

1. Parallelism -- support for recursive "sub-agents" through an ergonomic API (not: this is already feasible, see [recursive applications](http://localhost:8000/concepts/recursion/)).
1. Parallelism -- support for recursive "sub-agents" through an ergonomic API (not: this is already feasible, see [recursive applications](https://burr.dagworks.io/recursion/)).
2. Testing & eval curation. Curating data with annotations and being able to export these annotations to create unit & integration tests.
3. Various efficiency/usability improvements for the core library (see [planned capabilities](https://burr.dagworks.io/concepts/planned-capabilities/) for more details). This includes:
1. First-class support for retries + exception management
Expand Down
5 changes: 5 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* Enable line wrapping for code blocks */
.highlight pre {
white-space: pre-wrap;
word-wrap: break-word;
}
1 change: 1 addition & 0 deletions docs/concepts/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ Overview of the concepts -- read these to get a mental model for how Burr works.
state-typing
hooks
additional-visibility
parallelism
recursion
planned-capabilities
Loading

0 comments on commit 358d8d2

Please sign in to comment.