Skip to content

Commit

Permalink
build docs on prs, only deploy on main
Browse files Browse the repository at this point in the history
  • Loading branch information
elbeejay committed Feb 29, 2024
1 parent 7ec9b65 commit 4ebf1f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: docs
on:
push:
branches:
- main
pull_request:

jobs:
build:
Expand All @@ -26,7 +25,7 @@ jobs:
sphinx-build docs _build/html -b html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: job.status == 'success'
if: github.ref == 'refs/heads/main' && job.status == 'success'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
Expand Down

0 comments on commit 4ebf1f5

Please sign in to comment.