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

Workflow for automatic documentation creation and publishing #2652

Merged
merged 18 commits into from
Apr 27, 2022

Conversation

renehernandez
Copy link
Contributor

@renehernandez renehernandez commented Mar 17, 2022

Description

Fixes #2562

This PR adds a workflow to automate publishing documentation using:

You can see a running version of this documentation at https://renehernandez.github.io/external-dns/

Workflow details

  • Runs on every new tag
  • Publishes to gh-pages
  • Will update the latest version to point to the new tag version, so we get automatic redirection
  • Copies the CONTRIBUTING.md, code-of-conduct.md, LICENSE and README into the docs folder to make them available for the mkdocs build process
  • Cleans the README/index.md to remove the docs/ prefix from the links. It is necessary since after copying into the docs folder the relative path are no longer correct

Other Changes

  • Readme badges were modified into a single line, so they can show in a single line in the html generated by mkdocs
  • Fix invalid link to UKFast_SafeDNS tutorial

Notes

  • I am not publishing the proposal folder as part of the documentation, because it looks like the content is already out of date/implemented. I can add it if desired

Checklist

  • Unit tests updated (Not applicable)
  • End user documentation updated

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 17, 2022
@renehernandez
Copy link
Contributor Author

/assign @seanmalloy

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 21, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 21, 2022
@renehernandez
Copy link
Contributor Author

/assign @Raffo

@Raffo
Copy link
Contributor

Raffo commented Mar 30, 2022

@renehernandez this looks very cool. Before I review this, can you fix the linting issue?

golangci/golangci-lint info installed /home/runner/go/bin/golangci-lint
>> checking license header
license header checking failed:
make: *** [Makefile:58: licensecheck] Error 1
./docs/scripts/docs.go
Error: Process completed with exit code 2.

@renehernandez
Copy link
Contributor Author

@Raffo Update branch with latest master changes and fix the lint complains. Need you to approve again the workflows

@Raffo
Copy link
Contributor

Raffo commented Apr 6, 2022

@renehernandez noob question: we are using github pages already for helm releases, would this conflict with that? Is there a way we can make both work? /cc @stevehipwell as well who's our helm expert.

@stevehipwell
Copy link
Contributor

Based on the mike docs about special files it looks like existing files in the gh-pages branch wouldn't be modified. @renehernandez could you confirm that this is the case and has been tested?

Also I don't think that triggering the action on all tag pushes is correct, I assume that the docs need updating when ExternalDNS is released so the tags filter should be v* so as to not pick up chart releases etc.

@renehernandez
Copy link
Contributor Author

@Raffo @stevehipwell I'll replicate the current github pages content in my fork and push a new version to confirm that it doesn't removed them.

I'll update the workflow to only run on tags prefixed with v

@renehernandez
Copy link
Contributor Author

@Raffo @stevehipwell I've changed the docs workflow filter so it only runs on tags starting with v. Also verified that multiple docs releases do not remove content from the root of the repo in the gh-pages branch.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 11, 2022
@Raffo
Copy link
Contributor

Raffo commented Apr 14, 2022

@renehernandez thanks for the update, this is looking good! Please resolve the conflicts so that I can start CI again and we can give this a go, it will be a great addition.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 14, 2022
@renehernandez
Copy link
Contributor Author

@Raffo Fixed and ready to merge

@renehernandez
Copy link
Contributor Author

@Raffo Bumping this again

Copy link
Contributor

@Raffo Raffo left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 27, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Raffo, renehernandez

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 27, 2022
@k8s-ci-robot k8s-ci-robot merged commit 17ff991 into kubernetes-sigs:master Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publishing documentation
5 participants