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

Make targets and github workflow for publishing docs #23

Merged

Conversation

raukadah
Copy link
Contributor

@raukadah raukadah commented Dec 10, 2024

This pr adds:

  • Make docs to build the docs using ascii
    • Install ascii doc ruby packages using bundle
    • Convert README.md to main.adoc
    • Use Make target to build html files
  • Github action to build and publish docs on github pages.

Generated doc from Zuul Job: https://logserver.rdoproject.org/23/23/0feff09f3ebf811cca55fbdabc3c3efe51325011/github-check/watcher-operator-doc-preview/e7e85aa/docs_build/docs_build/watcher-operator/

Copy link

openshift-ci bot commented Dec 10, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@raukadah raukadah force-pushed the docs_publish branch 2 times, most recently from 93423e7 to 8f00d00 Compare December 10, 2024 09:03
@raukadah raukadah marked this pull request as ready for review December 10, 2024 09:05
@raukadah raukadah requested review from amoralej and SeanMooney and removed request for olliewalsh December 10, 2024 09:05
@raukadah raukadah force-pushed the docs_publish branch 3 times, most recently from 0feff09 to 6318e68 Compare December 10, 2024 10:40
docs/Makefile Outdated
open-html: html
${BROWSER_OPEN} "file://$(realpath $(ROOTDIR)/$(DEST_HTML))"

open-pdf: pdf
Copy link

Choose a reason for hiding this comment

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

is this one redundant we aren't wiring it up anywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

docs/Makefile Outdated
$(BUNDLE_EXEC) asciidoctor -a source-highlighter=highlightjs -a highlightjs-languages="yaml,bash" -a highlightjs-theme="monokai" --failure-level WARN -b xhtml5 -d book -o $@ $(MAIN_SOURCE)

$(DEST_PDF): $(ALL_SOURCES)
$(BUNDLE_EXEC) asciidoctor-pdf -d book -o $@ $(MAIN_SOURCE) $(IMAGES)
Copy link

Choose a reason for hiding this comment

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

same i think remove this one? besides not calling the open-pdf we are also commenting out the asciidoctor-pdf gem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/26bb4d4e24a64a2087a42d669b1598d6

✔️ noop SUCCESS in 0s
watcher-operator-doc-preview FAILURE in 1m 25s
✔️ openstack-meta-content-provider SUCCESS in 1h 33m 02s
✔️ watcher-operator-validation SUCCESS in 1h 11m 44s
✔️ watcher-operator-kuttl SUCCESS in 38m 27s

Gemfile Outdated
gem 'asciidoctor', '~> 2.0', '>= 2.0.20'

# Uncomment for ability to render pdf:
# gem 'asciidoctor-pdf', '~> 2.0', '>= 2.0.20'
Copy link

Choose a reason for hiding this comment

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

Any reason we are leaving the pdf commented and removing all the pdf but leaving 'Markdown to AsciiDoc' below? Comparing with https://github.com/openstack-k8s-operators/data-plane-adoption/blob/main/Gemfile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropped the commented piece from Gemfile as asciidoctor-pdf is not used in the existing make target.

docs/Makefile Outdated

html-latest: prepare $(IMAGES_TS) $(DEST_HTML)

pdf: prepare $(DEST_PDF)
Copy link

Choose a reason for hiding this comment

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

one more left?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

docs/Makefile Outdated
@mkdir -p $(DEST_DIR) $(IMAGES_DIR)

clean:
@rm -rf "$(DEST_DIR)" "$(DEST_PDF)"
Copy link

Choose a reason for hiding this comment

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

i think we should remove this reference too DEST_PDF?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

This pr adds:
- Make docs to build the docs using ascii
  * Install ascii doc ruby packages using bundle
  * Convert README.md to main.adoc
  * Use Make target to build html files
- Github action to build and publish docs on github pages.
- Zuul job to preview docs

Signed-off-by: Chandan Kumar <[email protected]>
@amoralej
Copy link
Contributor

/lgtm

Copy link

@marios marios left a comment

Choose a reason for hiding this comment

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

thanks

Copy link

@rlandy rlandy left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks for the replies and updates. Looks good to start .

@amoralej
Copy link
Contributor

/approve

Copy link

openshift-ci bot commented Dec 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amoralej

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 214e8bd into openstack-k8s-operators:main Dec 13, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants