-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Relocate usage documentation with local images #440
Conversation
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
If we want to keep it consistant, do we need to change the file name as well? As a matter a fact, do we actually need to prefix the files with I proposed to have |
I missed that part. Does this mean the plan is to move away from the Jenkins CI job for gathering external documentation on a scheduled basis? |
Yes, when you are in this repo anyway the prefix seems to be redundant. You can check the openhabian repo for reference. |
No. The jenkins job will be continued. The current problem is, that jenkins only merges contents into the next.openhab.org homepage. Edit: |
My consistency comment was based on that job and the naming convention used by other external documentation integrations (e.g. Google Assistant, Android, ...). Are you planning to have the relevant repositories updated as well?
I still don't understand the need of a prefix. From my understanding, the GitHub Action
I have mixed feeling about it since I am glad that the current documentation isn't live. Even though a new release is cut on the skill side, it takes quite a bit of time to go live since it has to go through a certification process on the Amazon side. For this one, we would probably tie the documentation updating job on a schedule opposed to right when the release is published. |
So I see now where the prefix is used. It seems to be overkill to enforce this since the repository is already known at that point and any markdown and image files under the |
Never mind, I forgot about document links being affected by what I am proposing. So I understand the need for the prefix now. The last point I am confused about is that the GitHub Action job updates the |
Yes i want to update all of them step by step.
I will check if i missed something in the base action again or made a mistake, but in theory this should be fully configurable in the specific action for this repository later, which is not available yet. Here are the parts of my base action that are relevant: - name: Copy newest doc contents
run: |
echo "Copy current doc contents"
cp -v ./external_contents/${{inputs.base_source_repository}}/docs/${{inputs.doc_base_name}}*.md ${{inputs.base_folder}}
# Copy images only if flag is set to true
- name: Copy newest images
if: ${{ inputs.has_images == true}}
run: |
echo "Copy current images"
cp -v ./external_contents/${{inputs.base_source_repository}}/docs/images/${{inputs.image_base_name}}* ${{inputs.base_folder}}/images So in the next step i would create a new Fetch alexa docs action (parallel to the existing openhabian one) which then uses the base action with a different config for
Glad that you bring this up. We will have an action in the alexa repository (like openhab/openhabian#1633) and if you have strong arguments against release as a trigger, this is perfectly fine for me and we will fire the action on different parameters than the openhabian one. :) The Repo owners or repo main contributors have way more knowledge and experience of their apps and when the docs should get into the stable homepage. |
Thanks for the detailed explanation.
If I understood correctly, we would set |
If the call-reusable-fetch-workflow:
uses: openhab/openhab-docs/.github/workflows/fetch_external_docs_reusable.yml@main
with:
base_source_repository: openhab-alexa
base_folder: _addons_ios/alexa-skill
has_images: true As a side note, I would make |
Nope. I missed the deviating folder structure of the installation folder where openhabian is placed. If every repo would use its own prefix this would be easier for me and a bit more future proof in my view. If possible (i have to check the maven conf for jenkins for that) i would like to get rid of those many extra folders on long term. |
First, I am not a fan of prefixing all files in the source repository. It's fine if you have one or two files but if you have a bunch of images, it would start to over complicate things. |
@Confectrician any thoughts on what I highlighted above? I would love to add this change in the final 3.2 release. I am basically suggesting to use the file names listed above. You would need to make the following changes to @@ -30,15 +30,16 @@
type: string
doc_base_name:
description: 'The doc file name prefix for lookup options.'
- required: true
+ required: false
type: string
has_images:
description: 'Flag for enabling image copy commands.'
- required: true
+ default: false
+ required: false
type: boolean
image_base_name:
description: 'The image name prefix for lookup options'
- required: true
+ required: false
type: string
jobs: And add name: Fetch OpenHAB Skill For Amazon Alexa Docs
on:
# Repository dispatch event, to be triggerd by an openhab-alexa release
# or manually from the openhab-alexa repository
repository_dispatch:
types: [update-openhab-alexa-docs-event]
workflow_dispatch:
jobs:
call-reusable-fetch-workflow:
uses: openhab/openhab-docs/.github/workflows/fetch_external_docs_reusable.yml@main
with:
base_source_repository: openhab-alexa
base_folder: _addons_ios/alexa-skill
has_images: true If you decide to update the external documentation structure in the future, |
It can't be kept, since it is not the truth for all external repositories currently. The problem here is more, that alexa skill and the other integrations live in a completely different homepage area when the website build has taken place, not in the docs area. Anyway and to be honest. If it is not acceptable to have some file prefixes for whatever reason i will accept this solution.... |
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
I agree. I am not asking to change the way each external repositories is structured. I only proposing to add some flexibility and not mirror the openhabian documentation format to all other repositories. |
I have already adapted the file names according to the suggestion and i have also stopped the complete ci pipeline currently for other reasons. If there are no disadvantages from your side anymore, this would be a good time to make the changes in both repositories. |
I just added a few documentation cleanup that I intended to merge as well and also fixed the logo image link.
I will merge this PR now. Feel free to update your side. |
This will:
docs
like it is done in other openHAB repositories (googel assistant / openhabian / ...)docs
like it is done in other repositoriesoh_alexa
for the doc filesA coordinated merge would be neat, because this will break the current Jenkins CI Job for generating the docs website.
Therefore i have prepared openhab/openhab-docs#1698
Would be nice if we can merge both PRs at the same time to keep the build job running continous.
Goal
Follow Up (in another PR)
For this i need to have the structure and file prefixes in place.