If a contributor has not created a sharable preview of a documentation PR, here are the steps to checkout a git pull request for local testing.
Helpers: GitHub, DevOpsCube
Following is approach to checking out the branch that a PR asks to merge. Alternatively you could use any other technique that accomplishes the same thing.
git fetch to get a local copy of the PR’s branch (note: be sure to check out the right PR!)Fetch the reference to the pull request based on its ID number, creating a new branch locally. Replace ID with your PR # and BRANCH_NAME with the desired branch name. The branch name will be used in your local workspace; you can pick anything you like.
The following command assumes that your local workspace has a “git remote” named “upstream” that refers to the shared repository at github.com/kubestellar/kubestellar.
git fetch upstream pull/ID/head:BRANCH_NAME
Checkout the BRANCH_NAME where you have all the changes from the pull request.
git checkout BRANCH_NAME
At this point, you can do anything you want with this branch. You can run some local tests, or merge other branches into the branch.
You can now run tests or build the documentation locally to view and verify changes in the branch that you have checked out.