canonical / sphinx-docs-starter-pack

A documentation starter-pack
https://canonical-starter-pack.readthedocs-hosted.com/
Other
15 stars 37 forks source link

launchpad support #262

Open toabctl opened 1 month ago

toabctl commented 1 month ago

Hi,

I want to document a public repo hosted on launchpad. I wonder now how that works. The questions I have are:

1) how can I disable/adjust the "Give Feedback" button. it does use github issue parameters which won't work on launchpad (found in the docs) 2) how can I integrate automatic checks with lpci instead of github actions? 3) how can I change the "More resources -> GitHub" link to use launchpad instead of github? (found in the docs)

SecondSkoll commented 1 month ago

Launchpad isn't currently supported by default, but two relatively similar requests have come up at the same time so I'm going to see if we can set up a default sort of setup for deployment of the starter pack on Launchpad.

To address your remaining question:

Having lpci use the local checks available through make is the easiest way to run these checks on Launchpad. I had issues using Noble, but the following .launchpad.yaml file worked for me to run the linkchecking mechanism:

pipeline:
- test-links
- test-spelling

jobs:
  test-links:
    series: jammy
    architectures: amd64
    packages: [make, python3.10-venv, git]
    run: make linkcheck
  test-spelling:
    series: jammy
    architectures: amd64
    packages: [make, python3.10-venv, git, aspell, aspell-en]
    run: make spelling

I will also note that RTD can pull from public Launchpad based documentation, but the custom webhooks don't seem to work. There's no way to add RTD's SSH keys to auth against the webhooks, so RTD generation needs to be manual or linked to the lpci run somehow - so I'm investigating the use of secrets to achieve this.

Edit: On consultation with my team, there's no such function in Launchpad. So, RTD needs to be triggered manually, or you could theoretically curl into the webhook with an exposed API key... Which seems less than ideal.