Skip to content

Commit

Permalink
Return to separate build/deploy jobs. Run deploy even on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
smithara committed Feb 14, 2024
1 parent 095f6c8 commit 99eba7c
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ jobs:
build:
name: Build Jupyter Book
runs-on: ubuntu-latest
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# Set up the execution environment
- name: Checkout repository
Expand All @@ -40,15 +32,29 @@ jobs:
conda run -n bookbuilder \
pytest --numprocesses auto --nbmake --overwrite --nbmake-kernel=igrf notebooks/*.ipynb
- name: Build jupyter book
id: build-book
if: always()
if: success() || failure()
shell: bash -el {0}
run: conda run -n bookbuilder jupyter-book build .
# Push the resulting html to GitHub Pages
- name: Upload artifact to pass to GitHub Pages
if: success() || failure()
uses: actions/upload-pages-artifact@v3
with:
path: _build/html
deploy:
name: Deploy to GitHub Pages
needs: build
if: success() || failure()
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 99eba7c

Please sign in to comment.