From 639a797fa5b058b87478de6526b26b75bb97b5f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 6 Nov 2025 17:10:04 +0000 Subject: [PATCH 1/8] [CI] Rework docs deployment --- .github/workflows/Documentation.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 512bcbde..33926aa0 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -48,9 +48,15 @@ jobs: version: "min" - uses: julia-actions/cache@v2 id: julia-cache + - uses: actions/create-github-app-token@v2 + id: generate_token + # if: ${{ ! github.event.pull_request.head.repo.fork }} + with: + app-id: "${{ secrets.NUMTERRA_BOT_ID }}" + private-key: "${{ secrets.NUMTERRA_BOT_PRIVATE_KEY }}" - uses: julia-actions/julia-docdeploy@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - name: Save Julia depot cache on cancel or failure id: julia-cache-save From 71ed6c0874336f9cf0dac8cba8e1664938056ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 6 Nov 2025 17:42:56 +0000 Subject: [PATCH 2/8] [CI] Upload documentation build as an artifact --- .github/workflows/Documentation.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 33926aa0..3d88ab9f 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -66,3 +66,8 @@ jobs: path: | ${{ steps.julia-cache.outputs.cache-paths }} key: ${{ steps.julia-cache.outputs.cache-key }} + - uses: actions/upload-artifact@v4 + with: + name: documentation-build + path: docs/build + retention-days: 7 From 83532ed32ca0f56fa6fa1bd0c6cdd3f42bc85070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 6 Nov 2025 17:53:29 +0000 Subject: [PATCH 3/8] [docs] Push documentation to BreezeDocumentation --- docs/make.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index 6c49eb4f..c9bc354b 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -29,8 +29,10 @@ makedocs(sitename="Breeze", ] ) -deploydocs(; +deploydocs( + ; repo = "github.com/NumericalEarth/Breeze.jl", + deploy_repo = "github.com/NumericalEarth/BreezeDocumentation", devbranch = "main", push_preview = true, forcepush = true From 42e881cc848e52c011d044945f4b9125b6525c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 6 Nov 2025 18:24:50 +0000 Subject: [PATCH 4/8] [CI] Use BreezeDocumentation Documenter key --- .github/workflows/Documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 3d88ab9f..5ccbc4da 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -57,7 +57,7 @@ jobs: - uses: julia-actions/julia-docdeploy@v1 env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + DOCUMENTER_KEY: ${{ secrets.BREEZEDOCUMENTATION_DOCUMENTER_KEY }} - name: Save Julia depot cache on cancel or failure id: julia-cache-save if: cancelled() || failure() From 19132f8bbe7943bfb25cfa681fca4f327deb0ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 7 Nov 2025 00:07:02 +0000 Subject: [PATCH 5/8] [CI] Don't create token for PRs from forks --- .github/workflows/Documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 5ccbc4da..40d11f8b 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -50,7 +50,7 @@ jobs: id: julia-cache - uses: actions/create-github-app-token@v2 id: generate_token - # if: ${{ ! github.event.pull_request.head.repo.fork }} + if: ${{ ! github.event.pull_request.head.repo.fork }} with: app-id: "${{ secrets.NUMTERRA_BOT_ID }}" private-key: "${{ secrets.NUMTERRA_BOT_PRIVATE_KEY }}" From 907b6fa8ad199171acf990ff7e392f4fbf34bbea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 7 Nov 2025 00:28:56 +0000 Subject: [PATCH 6/8] [docs] Only push previews when all env vars are non-empty --- docs/make.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index c9bc354b..4f2b8bbe 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -34,6 +34,8 @@ deploydocs( repo = "github.com/NumericalEarth/Breeze.jl", deploy_repo = "github.com/NumericalEarth/BreezeDocumentation", devbranch = "main", - push_preview = true, - forcepush = true + # Only push previews if all the relevant environment variables are non-empty. This is an + # attempt to work around https://github.com/JuliaDocs/Documenter.jl/issues/2048. + push_preview = all(!isempty, (get(ENV, "GITHUB_TOKEN", ""), get(ENV, "DOCUMENTER_KEY", ""))), + forcepush = true, ) From 5f7621ccfe67038fff3ec4d6631565776d7b13f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 7 Nov 2025 00:52:02 +0000 Subject: [PATCH 7/8] [CI] Don't use app to generate github token --- .github/workflows/Documentation.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 40d11f8b..21c9a466 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -48,15 +48,9 @@ jobs: version: "min" - uses: julia-actions/cache@v2 id: julia-cache - - uses: actions/create-github-app-token@v2 - id: generate_token - if: ${{ ! github.event.pull_request.head.repo.fork }} - with: - app-id: "${{ secrets.NUMTERRA_BOT_ID }}" - private-key: "${{ secrets.NUMTERRA_BOT_PRIVATE_KEY }}" - uses: julia-actions/julia-docdeploy@v1 env: - GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCUMENTER_KEY: ${{ secrets.BREEZEDOCUMENTATION_DOCUMENTER_KEY }} - name: Save Julia depot cache on cancel or failure id: julia-cache-save From 43a2ce49b1a17db9dd34601ca72e8cd339b9c72b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 7 Nov 2025 01:13:18 +0000 Subject: [PATCH 8/8] Update link to documentation in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0fc33507..925c396d 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@

- 🌪 Fast and friendly Julia software for atmosphere simulations on CPUs and GPUs. https://numericalearth.github.io/Breeze.jl/dev/ + 🌪 Fast and friendly Julia software for atmosphere simulations on CPUs and GPUs. https://numericalearth.github.io/BreezeDocumentation/dev/

- + Documentation