This feature is under beta testing and only available for a selected number of projects.
We use AWS Amplify to build a preview site for the docs every time someone sends a pull request that updates the docs folder.
Once the build completes, the pull request receives a message with a link to preview the docs.
On this page, you will learn how to enable pull request previews in a repository with the toolchain installed.
Copy the file amplify.yml in the project root directory.
Commit and push the changes to GitHub (default branch).
To complete the installation, we must list the repository in the company’s AWS account. Contact us in Slack (
#scylla-docschannel) to set this configuration for you.
Instructions to enable previews on AWS:
In the company’s AWS account, search for AWS Amplify in the search console.
Do one of the following:
If you are at the AWS Amplify homepage, click on Get Started under AWS Amplify Hosting.
Otherwise, click on New App > Host Web App.
Select Import from GitHub. You might be asked to grant permissions to AWS Amplify in your GitHub account.
Find the repository you want to enable pull request previews.
Set the default branch (e.g.
Check Connecting to a monorepo? and pick the folder
Under Build and test settings, you should see the message “We detected
amplify.yml in your repository and will use it to deploy your app.”. If it is not the case, review Installation.
Expand Advanced settings and set Build image to
Choose Next. On the Review page, choose Save and deploy.
On the left sidebar, go to Previews page and choose Preview Settings.
Select the default branch from the list and choose Manage.
Turn on pull request previews.
The next time you submit a pull request for the branch, AWS Amplify will build the docs automatically and share a preview URL as a pull request comment.
To build pull-request previews only if the pull-request edits the docs folder, set the following environment variables on your AWS Amplify application:
AMPLIFY_DIFF_DEPLOY = true AMPLIFY_DIFF_DEPLOY_ROOT = docs AMPLIFY_SKIP_BACKEND_BUILD = true
For more information on how to set environment variables, see the Environment variables section on AWS Amplify docs.
Code owners and third-party contributors can build pull request previews. To ban abusive users, see Blocking a user from your organization.
Previews builds have a 15 min limit. Nevertheless, we recommend you make sure the command
make dirhtml does not take more than 3 minutes to build on average.
Even if your repository is private, all the pull requests previews will be publicly available by default.
AWS deletes previews when the pull request gets merged or closed.