Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc builds for released versions #48

Closed
1 task done
tfiers opened this issue Jan 2, 2023 · 13 comments
Closed
1 task done

Doc builds for released versions #48

tfiers opened this issue Jan 2, 2023 · 13 comments

Comments

@tfiers
Copy link
Owner

tfiers commented Jan 2, 2023

There are no v2 docs in dropdown (and v2 dir in gh pages branch root, probably).

Sth with key?

According to https://documenter.juliadocs.org/stable/lib/public/#Documenter.deploydocs
should be automatic 🙄

  • look at other projs (like dataframes)
@tfiers
Copy link
Owner Author

tfiers commented Jan 3, 2023

Aha:

if you use GitHub Actions to build the documentation for your package, you will find that with the default TagBot configuration, your documentation build is not triggered when a new tag is created. In this case, you will need to use SSH Deploy Keys.

https://github.com/JuliaRegistries/TagBot#setup

@tfiers
Copy link
Owner Author

tfiers commented Jan 4, 2023

(the relevant page from docu, on same topic (but from other side) is here: https://documenter.juliadocs.org/dev/man/hosting/#GitHub-Actions:~:text=TagBot%20%26%20tagged%20versions. just posting cause deleting in yamls)

@tfiers
Copy link
Owner Author

tfiers commented Jan 4, 2023

ok, "Rerun jobs", for the commit with the v0.2.0 tag.

luckily that commit (36b265b) has edits not ignored by Docs.yml
(ye, BuildDocs.yml is better!)

the new run: https://github.com/tfiers/PkgGraph.jl/actions/runs/3819553217/jobs/6541150271

@tfiers
Copy link
Owner Author

tfiers commented Jan 4, 2023

According to documenter.juliadocs.org/stable/lib/public/#Documenter.deploydocs
should be automatic

specifically:

When building the docs for a tag (i.e. a release) the documentation is deployed to a directory with the tag name (i.e. vX.Y.Z) and to the stable directory.

So, ig it checks if current (last) commit has git tag. and then viola

@tfiers
Copy link
Owner Author

tfiers commented Jan 4, 2023

from readin docs btw,
(like this)

JuliaRegistries/TagBot#setup

, I feel DOCUMENTER_KEY is

  1. not needed in Docs.yml (unlike what this says)

documenter.juliadocs.org/dev/man/hosting/#GitHub-Actions:~:text=TagBot%20%26%20tagged%20versions

  1. needn't be called that. It's more sth: "PRIVATE SSH KEY THAT LETS WORKFLOWS TRIGGER OTHER WORKFLOWS"
    (and it's tagbot that triggers docs. docs needn't trigger anytin. it can keep using it's built-in 'gh actions' secret: secrets.GITHUB_TOKEN)

@tfiers
Copy link
Owner Author

tfiers commented Jan 4, 2023

Btw, documenting what I did:

$ ssh-keygen -t ed25519 -C "tomas.fiers@gmail.com"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/c/Users/tfiers/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/tfiers/.ssh/id_ed25519
Your public key has been saved in /c/Users/tfiers/.ssh/id_ed25519.pub

The first (public) went here, to deploy keys https://github.com/tfiers/PkgGraph.jl/settings/keys
(I gave it arb name: "for documenter<>tagbot. from ~/.ssh")

and the second (private) I put here https://github.com/tfiers/PkgGraph.jl/settings/secrets/actions
repository secrets, and named it DOCUMENTER_KEY

@tfiers
Copy link
Owner Author

tfiers commented Jan 4, 2023

Ah, en CompatHelper also has this key, as it needs to, indeed, trigger a Tests run when it makes it [compat] PR. https://docs.juliahub.com/CompatHelper/GCWpz/2.1.1/#Installation,-step-2:-Set-up-the-SSH-deploy-key

(though it shouldn't have to trigger Docs. oh well)
ah, but can just exclude Project.toml from docs. :)

althoughhhh. Project.toml is gud, cause Register.yml updates that, makes that the registered commit.

so yeah, let us keep it

btw, does it really need to be PEM (what above compathelper docs link says)? or is the (newer, ig) ed25519 good too. I would guess it is

EDIT: link for newer docs (google and old doc versions 🙄): https://juliaregistries.github.io/CompatHelper.jl/stable/#Creating-SSH-Key

@tfiers
Copy link
Owner Author

tfiers commented Jan 4, 2023

...
mah heuh. 😒
Still no v.2 in dropdown, still only dev. booh.

What does it take then? ffs

@tfiers
Copy link
Owner Author

tfiers commented Jan 4, 2023

fuck it I clone gh-pages branch and finaggle mahself

@tfiers
Copy link
Owner Author

tfiers commented Jan 4, 2023

[x] look at other projs (like dataframes)

hah so I did that. but not for config, rather for how to emulate what deploydocs does auto,
for

fuck it I clone gh-pages branch and finaggle mahself

(it's here btw: https://github.com/JuliaData/DataFrames.jl/blob/gh-pages/versions.js)

@tfiers
Copy link
Owner Author

tfiers commented Jan 4, 2023

ok that did it. leaving open to see if for next tag, auto doc version deploy does work

@tfiers
Copy link
Owner Author

tfiers commented Jan 5, 2023

Oh hell yes
image

finally

@tfiers tfiers closed this as completed Jan 5, 2023
@tfiers
Copy link
Owner Author

tfiers commented Jan 5, 2023

(this worked with draft: true btw in TagBot. I even deleted that draft and made an own release (with gh making the tag for you!)) and that worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant