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

Feature: docs deployment to GitHub pages via Actions #327

Conversation

bandantonio
Copy link
Contributor

@bandantonio bandantonio commented Oct 13, 2021

Overview

  • - Added static site generator to generate an HTML version of the documentation.
  • - Added GitHub Actions flow to deploy the documentation to GitHub Pages

Artifacts

Isomorphic Layout Composer (ILC) documentation site on GitHub Pages

docs/index.md Outdated
@@ -0,0 +1,112 @@
![Isomorphic Layout Composer logo](./assets/brand/cover_small.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's a good idea to copy/paste README here.

Copy link
Contributor Author

@bandantonio bandantonio Oct 13, 2021

Choose a reason for hiding this comment

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

The idea is not to copy-paste it. We must have an index file for the documentation, that's why it appears here.
I would suggest shrinking the README file as much as we can (for example, describe only the major points) and for everything else - point to the documentation.
This PR shows the first step in this direction.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really like the idea of shrinking the README file until we established website well. Now project gets most of it's traffic to the main page with README on it.

docs/global_api.md Show resolved Hide resolved
docs/ilc_app_interface.md Show resolved Hide resolved
@@ -10,7 +10,7 @@ In order to upgrade ILC to higher version you only need to replace running Docke
in the following order: Registry first, ILC itself after.
So you should never have newer version of ILC running alongside outdated Registry.

To get more information about exact configuration of the Docker images see [docker-compose.yml](../docker-compose.yml).
To get more information about exact configuration of the Docker images see [docker-compose.yml](https://github.com/namecheap/ilc/blob/master/docker-compose.yml).
Copy link
Contributor

Choose a reason for hiding this comment

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

Absolute links are not really good idea as it's hard to maintain them

Copy link
Contributor

Choose a reason for hiding this comment

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

Same below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, if you want to keep old files like global_api that only contain links to redirect users to a new destination, you will have to maintain those links anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Furthermore, as the deployed version of the documentation consists of only static content (the files from the docs folder only), it is impossible to refer to the docker-compose.yml or any other file from the project folder using the relative paths - these files do not exist there.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be possible to correctly transform links with one of these plugins:
https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins#links--references

Also - this comment isn't really relevant for old files like global_api.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I Investigated a bit this topic and found a plugin that makes it possible to insert dynamic variables so that we can use something like that {{ repo_url }}/docker-compose.yml to refer to the source files in the repository.
repo_url is defined in the main configuration file mkdocs.yml so keeping all the links up-to-date will be an easy task.

## React
Copy link
Contributor

Choose a reason for hiding this comment

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

Pls rename file back to README.md as it looks better in GitHub interface (README.md will be rendered here https://github.com/bandantonio/ilc/tree/feature/docs-deployment-to-github-pages-via-actions/docs/stepbystep)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not a problem, though, I'm wondering, does it make sense to worry about how things get rendered in the GitHub interface when there will be a fully-featured documentation view?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, most of the traffic goes to GitHub

- gh-pages
jobs:
build_docs:
name: Build documentation
Copy link
Contributor

Choose a reason for hiding this comment

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

Pls integrate with main CI flow. Should be after successful build & push to Docker repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW, there is one tricky aspect - do we really need build and push steps to complete successfully before generating and publishing documentation? (see line #148 in the ci.yml). I mean, there may be cases when you update documentation files only but build or push failed for some reason. In this case, the updated documentation won't be available until the CI steps are fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fun fact - currently, there is exactly the same situation I described in my previous comment. I cannot provide you with a link to generated documentation because the required steps failed and documentation generation was skipped.

.github/workflows/docs.yml Outdated Show resolved Hide resolved
mkdocs.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
docs/index.md Outdated
@@ -0,0 +1,112 @@
![Isomorphic Layout Composer logo](./assets/brand/cover_small.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really like the idea of shrinking the README file until we established website well. Now project gets most of it's traffic to the main page with README on it.

@@ -10,7 +10,7 @@ In order to upgrade ILC to higher version you only need to replace running Docke
in the following order: Registry first, ILC itself after.
So you should never have newer version of ILC running alongside outdated Registry.

To get more information about exact configuration of the Docker images see [docker-compose.yml](../docker-compose.yml).
To get more information about exact configuration of the Docker images see [docker-compose.yml](https://github.com/namecheap/ilc/blob/master/docker-compose.yml).
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be possible to correctly transform links with one of these plugins:
https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins#links--references

Also - this comment isn't really relevant for old files like global_api.

## React
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, most of the traffic goes to GitHub

@StyleT
Copy link
Contributor

StyleT commented Oct 13, 2021

@bandantonio let's discuss this in Skype Fri/Mon ;)

@StyleT StyleT force-pushed the feature/docs-deployment-to-github-pages-via-actions branch from 593f1f7 to 064e32f Compare October 20, 2021 12:54
… github.com:bandantonio/ilc into feature/docs-deployment-to-github-pages-via-actions
@StyleT StyleT merged commit bffa590 into namecheap:master Oct 20, 2021
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

Successfully merging this pull request may close these issues.

2 participants