Skip to content

Commit

Permalink
CI: move publish conditional from jobs to step level
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Oct 23, 2024
1 parent ee9f4f1 commit 4c6b47b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/ci_publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish HTML
name: Build and Publish HTML

on:
push:
Expand Down Expand Up @@ -32,16 +32,11 @@ jobs:
- name: Install dependencies
run: python -m pip install --upgrade tox

- name: Execute notebooks as testing
- name: Build HTML with executing notebooks
run: tox -e py311-buildhtml

publish:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
name: Publish HTML
needs: build_docs
runs-on: ubuntu-latest
steps:
- name: Publish
- name: Publish HTML when on main
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 4c6b47b

Please sign in to comment.