Skip to content

Commit c2ae6c0

Browse files
authored
[CI] Rework docs deployment (#77)
* [CI] Rework docs deployment * [CI] Upload documentation build as an artifact * [docs] Push documentation to BreezeDocumentation * [CI] Use BreezeDocumentation Documenter key * [CI] Don't create token for PRs from forks * [docs] Only push previews when all env vars are non-empty * [CI] Don't use app to generate github token * Update link to documentation in README.md
1 parent 9565bfd commit c2ae6c0

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.github/workflows/Documentation.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- uses: julia-actions/julia-docdeploy@v1
5252
env:
5353
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
54+
DOCUMENTER_KEY: ${{ secrets.BREEZEDOCUMENTATION_DOCUMENTER_KEY }}
5555
- name: Save Julia depot cache on cancel or failure
5656
id: julia-cache-save
5757
if: cancelled() || failure()
@@ -60,3 +60,8 @@ jobs:
6060
path: |
6161
${{ steps.julia-cache.outputs.cache-paths }}
6262
key: ${{ steps.julia-cache.outputs.cache-key }}
63+
- uses: actions/upload-artifact@v4
64+
with:
65+
name: documentation-build
66+
path: docs/build
67+
retention-days: 7

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
<!-- description -->
77
<p align="center">
8-
<strong>🌪 Fast and friendly Julia software for atmosphere simulations on CPUs and GPUs. https://numericalearth.github.io/Breeze.jl/dev/</strong>
8+
<strong>🌪 Fast and friendly Julia software for atmosphere simulations on CPUs and GPUs. https://numericalearth.github.io/BreezeDocumentation/dev/</strong>
99
</p>
1010

1111
<p align="center">
12-
<a href="https://numericalearth.github.io/Breeze.jl/dev/">
12+
<a href="https://numericalearth.github.io/BreezeDocumentation/dev/">
1313
<img alt="Documentation" src="https://img.shields.io/badge/documentation-in%20development-orange?style=flat-square">
1414
</a>
1515
<a href="https://github.com/NumericalEarth/Breeze.jl/discussions">

docs/make.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ makedocs(sitename="Breeze",
2929
]
3030
)
3131

32-
deploydocs(;
32+
deploydocs(
33+
;
3334
repo = "github.com/NumericalEarth/Breeze.jl",
35+
deploy_repo = "github.com/NumericalEarth/BreezeDocumentation",
3436
devbranch = "main",
35-
push_preview = true,
36-
forcepush = true
37+
# Only push previews if all the relevant environment variables are non-empty. This is an
38+
# attempt to work around https://github.com/JuliaDocs/Documenter.jl/issues/2048.
39+
push_preview = all(!isempty, (get(ENV, "GITHUB_TOKEN", ""), get(ENV, "DOCUMENTER_KEY", ""))),
40+
forcepush = true,
3741
)

0 commit comments

Comments
 (0)