Skip to content

Conversation

@giordano
Copy link
Collaborator

@giordano giordano commented Nov 6, 2025

No description provided.

@giordano giordano added the documentation 📜 Improvements or additions to documentation label Nov 6, 2025
@giordano giordano force-pushed the mg/docs-deployment branch 8 times, most recently from e60e6a4 to dd1cb26 Compare November 6, 2025 18:25
@giordano
Copy link
Collaborator Author

giordano commented Nov 6, 2025

It's working: https://numericalearth.github.io/BreezeDocumentation/previews/PR77/ 🚀 I need to understand why the commit status isn't being reported though (I guess because the deployment is happening in a different repo? I don't know how to link up that one). In the worst case we can manually create a custom status. Edit: I believe that's a bug in Documenter.jl.

@giordano giordano force-pushed the mg/docs-deployment branch 5 times, most recently from b8b9d72 to d99b12b Compare November 6, 2025 19:46
@giordano
Copy link
Collaborator Author

giordano commented Nov 6, 2025

I have a fix: JuliaDocs/Documenter.jl#2816 🚀

image

@navidcy
Copy link
Member

navidcy commented Nov 6, 2025

Great!

Comment on lines 51 to 53
- uses: actions/create-github-app-token@v2
id: generate_token
# if: ${{ ! github.event.pull_request.head.repo.fork }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR is basically ready, the only thing I need to figure out is seeing what happens when a PR is opened from a fork, whether this step fails gracefully (it'd just return an empty token or such) or loudly, making the job fail.

Copy link
Member

@navidcy navidcy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why lots/most of the doc src files are deleted? Is it still debugging mode?

@giordano
Copy link
Collaborator Author

giordano commented Nov 7, 2025

Why lots/most of the doc src files are deleted? Is it still debugging mode?

Yes, I still need to remove the DROP ME commit 🙂

@giordano giordano marked this pull request as ready for review November 7, 2025 00:30
Copy link
Collaborator Author

@giordano giordano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think this is ready now! The commit status won't work until JuliaDocs/Documenter.jl#2816 makes it into a new release, but we can't do too much about it for the time being (apart from temporarily using a fork, but I'd rather avoid that if possible)

Comment on lines +37 to +39
# 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", ""))),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd need to wait for a PR by dependabot to be sure this is working correctly, but looking at https://github.com/NumericalEarth/Breeze.jl/actions/runs/19032077021/job/54348250773?pr=61#step:5:5 GITHUB_TOKEN isn't empty, but DOCUMENTER_KEY is, so making sure they're both non-empty should be a decent approach.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just learned about dependabot secrets, in principle we can set DOCUMENTER_KEY for dependabot too, but I think the solution I proposed should be robust in all cases, regardless of whether we decide to set DOCUMENTER_KEY for dependabot or not.

Comment on lines 51 to 59
- 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 }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a second thought, I'm not entirely sure an app is needed for this, pushing to the other repo happens via DOCUMENTER_KEY. Let me try that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that the app was unnecessary for this task after all. Oh well, we have it set up anyway, we can use it for something else cool!

@navidcy
Copy link
Member

navidcy commented Nov 7, 2025

Cool!!

Regarding previews: for Oceananigans I had set up all PRs push previews and then have also a GitHub action job that cleans the previews on the Documentation repo.

@giordano
Copy link
Collaborator Author

giordano commented Nov 7, 2025

Regarding previews: for Oceananigans I had set up all PRs push previews and then have also a GitHub action job that cleans the previews on the Documentation repo.

Yes, as I mentioned in #82 (comment) we'll move the scheduled cleanup job to the other repo 👍

@giordano giordano merged commit c2ae6c0 into main Nov 7, 2025
1 check passed
@giordano giordano deleted the mg/docs-deployment branch November 7, 2025 01:22
@giordano
Copy link
Collaborator Author

giordano commented Nov 7, 2025

Aaaand we're live on the new repo: https://numericalearth.github.io/BreezeDocumentation/ 🥳

@glwagner
Copy link
Member

glwagner commented Nov 7, 2025

eeeexcellent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📜 Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants