From 6eb1df6568a15e8ad352ca98853b6bb095122c5c Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 19 Oct 2023 14:40:40 +0200 Subject: [PATCH 1/2] MAINT: update workflow actions --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9d7b92f..49b2fcc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,7 +14,7 @@ jobs: 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" @@ -38,7 +38,7 @@ 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 From 70c2df05a7bdb98ea1f04087679c317f195fff29 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:52:50 +0200 Subject: [PATCH 2/2] DX: build documentation on fork as preview --- .github/workflows/docs.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 49b2fcc..e13fef8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,8 +2,6 @@ name: Documentation on: push: - branches: - - main pull_request: branches: - main @@ -11,6 +9,7 @@ on: 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: @@ -44,11 +43,11 @@ jobs: 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: