Skip to content

Commit

Permalink
DX: host GitHub Pages on fork as PR preview (#21)
Browse files Browse the repository at this point in the history
* MAINT: update workflow actions
  • Loading branch information
redeboer authored Oct 19, 2023
1 parent 88a0254 commit 94c273b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ name: Documentation

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
doc:
if: github.event_name == 'push' && (github.repository != 'ComPWA/strong2020-salamanca' || github.ref_name == 'main') || github.event_name == 'pull_request'
name: Execute and build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
Expand All @@ -38,17 +37,17 @@ jobs:
path: |
./docs/data
- run: jupyter book build docs/ -W
- uses: actions/upload-pages-artifact@v1
- uses: actions/upload-pages-artifact@v2
if: always()
with:
path: ./docs/_build/html

gh-pages:
if: github.event_name == 'push' && (github.repository != 'ComPWA/strong2020-salamanca' || github.ref_name == 'main')
name: Upload to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
needs:
- doc
permissions:
Expand Down

0 comments on commit 94c273b

Please sign in to comment.