docs/README-DEPLOYMENT.md
This page covers guidelines for deploying the Handsontable documentation.
The documentation is deployed via Netlify. A prod-docs/<MAJOR.MINOR> branch with the largest version number gets automatically tagged as the documentation's latest version.
The prod-docs/latest branch triggers a GitHub workflow that initiates a rebuild and deploys to Netlify on each push or when a new prod-docs/<MAJOR.MINOR> branch is created.
Handsontable's GitHub Actions setup deploys the documentation to Netlify.
Staging documentation is deployed on Netlify either automatically or manually based on the following diagram.
flowchart TD
Docs[Documentation Stage on Netlify]
Push[Push on files <pre>docs/*</pre>]
Manual[Manual <pre>workflow_dispatch</pre>]
PullRequest[Pull Request event]
PullRequestClose[Pull Request close]
Generate[Generate a preview at <pre>dev-handsontable-BRANCH_NAME.netlify.app</pre>]
Destory[Destroy, if exists, a preview at <pre>dev-handsontable-BRANCH_NAME.netlify.app</pre>]
Push -->|Automatic| Generate
Manual -->|Manual trigger on selected branch| Generate
PullRequest --> |Manual approve on PR page| Comment[Bot comments on PR page with URL] --> Generate
PullRequestClose --> |Automatic| Destory
Generate -->|Manual trigger| Destory
Docs --> Push
Docs --> Manual
Docs --> PullRequest
PullRequest --> PullRequestClose
workflow_dispatch manual trigger on any branchTo deploy the documentation to the staging environment, from GitHub Actions:
On pull request page there will be pipeline in waiting mode that once approved will (re)generate a staging version of documentation and bot will send url in PR comment.
When pull request is closed staged version will be delegated to destroy.
To deploy the documentation to the production environment, from GitHub Actions:
prod-docs/12.1).The deployment is handled entirely through Netlify. The netlify/ directory in the docs/ folder contains the Netlify configuration and build scripts used by the CI/CD pipeline.
To revert a production deployment to a previous version:
prod-docs/<MAJOR.MINOR> branch with the desired version.prod-docs/latest branch and push - this will trigger an automatic Netlify rebuild.