Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

Uses the keep_files flag to ensure that the main merge does not clobber the previews

elijahbenizzy9a978aea58e1
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 14fbc070..b6777edd 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -39,21 +39,21 @@ jobs:
number: ${{ github.event.number }}
id: deploy-preview
message: "Starting deployment of preview ⏳..."
- - name: Deploy to GitHub Pages
+ - name: Build PR preview website
uses: peaceiris/actions-gh-pages@v3
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
+ if: github.ref != 'refs/heads/main'
with:
- publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
- # force_orphan: true # TODO -- determine whether this is the right approach
- - name: Build PR preview website
+ destination_dir: ${{ env.PR_PATH }} # TODO you need to set this if you're using a custom domain. Otherwise you can remove it.
+ - name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- if: github.ref != 'refs/heads/main'
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
+ publish_branch: gh-pages
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.
+ keep_files: true # Add this line to keep existing files in the gh-pages branch
- name: Update comment
uses: hasura/[email protected]
if: github.ref != 'refs/heads/main'