Skip to content

Commit

Permalink
Always build docs on GHA. Only publish on push
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Apr 25, 2023
1 parent 996fdd1 commit 89efed4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,17 @@ jobs:
- name: Install
run: |
make install
- name: Build quartodoc files
- name: Render quarto site
run: |
make docs-ci
- name: Publish to GitHub Pages (and render)
- name: Publish to GitHub Pages (on push)
if: github.event_name == 'push'
uses: quarto-dev/quarto-actions/publish@v2
with:
path: docs
render: false
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@ coverage: ## check code coverage quickly with the default Python

quarto-shinylive: ## Make sure quarto-shinylive is installed
cd docs && (test -f _extensions/quarto-ext/shinylive/shinylive.lua || quarto install extension --no-prompt quarto-ext/shinylive)
quartodoc: ## Build quartodoc
docs-quartodoc: ## Build quartodoc
cd docs && python -m quartodoc build
docs-ci: quarto-shinylive quartodoc ## Build quartodoc for CI
docs: quarto-shinylive quartodoc ## generate quartodoc HTML documentation, including API docs
docs-render:
cd docs && quarto render
docs-ci: quarto-shinylive docs-quartodoc docs-render ## Build quartodoc for CI
docs-open:
$(BROWSER) docs/_site/index.html
docs: docs-ci docs-open ## generate quartodoc HTML documentation, including API docs

# # Perform `quarto preview` and `quartodoc build` in parallel
# watchdocs: quarto-shinylive
Expand Down

0 comments on commit 89efed4

Please sign in to comment.