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 22, 2024
1 parent 7bccbf4 commit 802f2b5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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
Expand All @@ -23,12 +23,14 @@ jobs:
- name: Sphinx build
run: |
sphinx-build docs -b dirhtml _build
echo "burr.dagworks.io" > _build/CNAME # keep the cname file which this clobbers -- todo, unhardcode
- name: Set CNAME for main branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: echo "burr.dagworks.io" > _build/CNAME
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
publish_branch: |
${{ github.event_name == 'pull_request' && 'pr-' + github.event.pull_request.number || 'gh-pages' }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true

0 comments on commit 802f2b5

Please sign in to comment.