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

[DOC] Publish HTML documentation preview on surge #128

Merged
merged 44 commits into from
Nov 22, 2022

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Oct 27, 2022

When documentation source files change, publish the generated documentation to surge to easy the review.
Create a workflow that will later include a job to publish to gh-pages.
The HTML documentation content is not customized nor updated. This will be done later.

refs #19
refs #40 (HTML documentation improvements)
closes #125

Completed tasks

documentation generation

  • setup pkgdown
  • search: to test locally, use a webserver (local browsing generates CORS error when using the search bar)

GH workflow

  • setup a workflow to deploy PR preview to surge as we do in other repositories
  • surge deploy
  • introduce a shared action to avoid duplication between the doc and build workflows

Notes

In the 1st commits of this PR, there was an attempt to have a job to build the documentation and others to deploy.
The build documentation job would be skipped . I tried to use a condition to skip it for surge teardown, but in this case the dependent job doing the surge teardown wasn't called.
The issue seems coming from actions/runner#491

The surge teardown is configured but it is not effective. See #128 (comment)
This is not a blocker: a schedule task teardowns stale deployments on regular basis, so even if the deployment is not remove when the PR is closed, this will be done few days later.

@tbouffard tbouffard added WIP 🚧 Pull request in progress and/or not ready for review. Used in addition to marking it as draft documentation Improvements or additions to documentation labels Oct 27, 2022
@tbouffard
Copy link
Member Author

Closing to test the surge teardown

@tbouffard tbouffard closed this Oct 27, 2022
@tbouffard tbouffard reopened this Oct 27, 2022
@tbouffard tbouffard closed this Oct 27, 2022
@tbouffard tbouffard reopened this Oct 27, 2022
@tbouffard tbouffard force-pushed the docs/generate_html_site branch from 45cb133 to 7267bf4 Compare November 17, 2022 15:14
@tbouffard tbouffard force-pushed the docs/generate_html_site branch from 7267bf4 to 9aa5836 Compare November 17, 2022 15:41
@tbouffard
Copy link
Member Author

⚠️ Current surge deploy error. This is an issue due to the environment, it works on the playground repository

(node:1654) UnhandledPromiseRejectionWarning: ReferenceError: Cannot access 'buildingLogUrl' before initialization
    at fail (/home/runner/work/_actions/afc163/surge-preview/v1/webpack:/surge-preview/lib/main.js:100:1)
    at /home/runner/work/_actions/afc163/surge-preview/v1/webpack:/surge-preview/lib/main.js:211:1
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:1654) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1654) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The error occurs both when the surge preview is called in the same job of the documentation is built or when it is in a dedicated job.

@tbouffard tbouffard changed the title [DOC] Generate the HTML documentation [DOC] Publish HTML documentation preview on surge Nov 18, 2022
@tbouffard
Copy link
Member Author

tbouffard commented Nov 21, 2022

Retesting the surge teardown, closing the PR temporary.
❌ Still KO. The issue comes from bonitasoft/actions/packages/surge-preview-tools@v2

The actual domain is using lower case, whereas the domain name checked for existence contains upper case parts (the name of the repository, in our case bpmn-visualization-R). As the check for existence is case sensitive, the action always detect that the domain doesn't exist

Number of domains: 14
##[debug]["process-analytics-github-actions-playground-demo_preview-pr-174.surge.sh","process-analytics-github-actions-playground-demo_preview-pr-175.surge.sh","process-analytics-github-actions-playground-demo_preview-pr-173.surge.sh","process-analytics-bpmn-visualization-r-pr_preview-pr-128.surge.sh","process-analytics-bpmn-visualization-r-demo_preview-pr-128.surge.sh","process-analytics-bpmn-visualization-js-demo_preview-pr-2353.surge.sh","process-analytics-bpmn-visualization-js-doc_preview-pr-2353.surge.sh","process-analytics-process-analytics-dev-site_preview-pr-738.surge.sh","process-analytics-bpmn-visualization-js-demo_preview-pr-2342.surge.sh","process-analytics-bpmn-visualization-js-doc_preview-pr-2342.surge.sh","process-analytics-process-analytics-dev-site_preview-pr-718.surge.sh","process-analytics-icpm-demo-2022-demo_preview-pr-80.surge.sh","process-analytics-bpmn-visualization-js-demo_preview-pr-2323.surge.sh","process-analytics-bpmn-visualization-js-doc_preview-pr-2323.surge.sh"]
::endgroup::
Checking if surge domain exist. Domain: process-analytics-bpmn-visualization-R-pr_preview-pr-128.surge.sh

Detailed logs:

@tbouffard tbouffard closed this Nov 21, 2022
@tbouffard tbouffard reopened this Nov 21, 2022
@tbouffard tbouffard removed the WIP 🚧 Pull request in progress and/or not ready for review. Used in addition to marking it as draft label Nov 22, 2022
@tbouffard tbouffard marked this pull request as ready for review November 22, 2022 09:22
@tbouffard tbouffard requested a review from csouchet November 22, 2022 09:22
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Co-authored-by: Thomas Bouffard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Deploy documentation preview on Surge
2 participants