-
Notifications
You must be signed in to change notification settings - Fork 92
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
Actions: Deploy preview docs #66
Actions: Deploy preview docs #66
Conversation
@tristanls I'm flummoxed. None of the docs.yml actions are running and I need help to figure out why. |
@codeallthethingz actions will not pass secrets on |
Ah, right! Thanks. |
I tried to add a trigger of both pull_request and pull_reqeust_target the docs.yml, but I feel like the entire file is skipped if there is a reference to a secret in it, which I think means I need to split the docs.yml into two - one for the secretless check-docs and one for the secretfull preview-docs. Do I have that right? |
Update as this has been fallow for a while. I stopped using the pin-comment third party tool and wrote an action that does the same thing. I've tested the preview docs as a pull_request triggered build, but have put it back as a pull_request_target for the code review. Which means it won't successfully run until we merge and open a new PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I added some comments, but nothing exciting.
response=$(curl -s -w "%{http_code}" -H "Authorization: token ${GITHUB_TOKEN}" \ | ||
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${ISSUE_NUMBER}/comments") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (non-blocking): This will fail to find the pinned comment if it is beyond the first page of results. I made this issue non-blocking since making new comments over and over is not the worst.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Not the worst. I think I'll increase the page size to 100, but if it's bigger than that I'd rather create a new comment than spend a bunch of action credits looking for a comment.
.github/workflows/docs-preview.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (blocking): Please rename to docs_preview.yml
to match the existing monty_api_docs.yml
.
.github/workflows/docs.yml
Outdated
@@ -90,7 +90,8 @@ jobs: | |||
echo $changed_file | |||
if [[ $changed_file == docs/* ]] || | |||
[[ $changed_file == tools/github_readme_sync/* ]] || | |||
[[ $changed_file == .github/workflows/docs.yml ]]; then | |||
[[ $changed_file == .github/workflows/docs.yml ]] || | |||
[[ $changed_file == .github/workflows/docs-preview.yml ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Why run the Docs workflow when docs_preview.yml
changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
This PR creates a set of hidden docs on readme.com with a version matching the current version of the docs up to the minor version + the branch name made safe for metadata on a semver version.
For example, this branch: 0.0-deploy-preview-docs
While building it puts a sticky note on the PR's comments
Building:
Finished:
Failure:
Similar to building but with a ❌
This PR needs some action secrets / vars to be created.
Note
Currently preview docs are not deleted when they are merged to main, this will be done in a separate PR.