Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Action that runs quarto render to check for broken links and errors#237

Merged
noosheenv merged 56 commits intomainvalidmind/documentation:mainfrom
noosheenvazinkhoo/sc-5241/create-github-action-to-run-quarto-rendervalidmind/documentation:noosheenvazinkhoo/sc-5241/create-github-action-to-run-quarto-renderCopy head branch name to clipboard
Jul 10, 2024
Merged

Action that runs quarto render to check for broken links and errors#237
noosheenv merged 56 commits intomainvalidmind/documentation:mainfrom
noosheenvazinkhoo/sc-5241/create-github-action-to-run-quarto-rendervalidmind/documentation:noosheenvazinkhoo/sc-5241/create-github-action-to-run-quarto-renderCopy head branch name to clipboard

Conversation

@noosheenv
Copy link
Contributor

@noosheenv noosheenv commented Jul 3, 2024

Internal Notes for Reviewers

I made a Github action to run quarto render to check for errors and broken links every time you push a commit.

The file is called render-site.yaml and resides in the .github/workflows folder.

The first few steps installs any necessary dependencies, such as Quarto and its associated extensions by using quarto install extension. It also tells the action to run when someone either makes a new PR or pushes something.

Then, it runs quarto render and checks for any immediate errors, like if you had something really off in the _quarto.yml file. Here's what it looks like when you try to push something with a big error:
image
It shows the output and also displays a message saying Quarto failed immediately.

If there are no big errors, quarto render will run in the background, which takes approximately 5 minutes. The workflow will then check the output for any instances of warnings or errors. If there are warnings, usually for broken links, the check will fail and display where the warning is. Here is an example:
image
You can find a detailed view like the screenshot above by clicking on Details next to the Quarto render check like this:
image

If there are no errors or warnings, the check will pass.

Other changes:
There were still some issues with broken links relating to the name of the NLP_and_LLM folder, so some commits fix that. Also, some release notes were referencing our hacky NLP_and_LLM folder, so upon fixing the folder name, the links were updated to reference nlp_and_llm.

External Release Notes

noosheenv added 2 commits July 3, 2024 15:13
…o noosheenvazinkhoo/sc-5241/create-github-action-to-run-quarto-render
@noosheenv noosheenv added DO NOT MERGE PR is not ready to be merged internal Not to be externalized in the release notes labels Jul 3, 2024
@noosheenv noosheenv self-assigned this Jul 3, 2024
@noosheenv noosheenv requested a review from nrichers July 10, 2024 19:14
@noosheenv
Copy link
Contributor Author

Summary of changes:

  • Got rid of the on push thing, and just had the same line as the release notes check:
on:
  pull_request:
    types: [opened, synchronize, labeled, unlabeled, edited, ready_for_review]
  • Learned that Github runs workflows only if PR is able to merge first, and that's why the tests weren't running, not because of this on: pull_request thing
  • Got Chatgpt to help me retrieve a working download link of the latest Quarto version, building off what you had (almost there but was giving error 404)
  • Cleaned up comments and fixed suggested wording changes

@nrichers nrichers marked this pull request as draft July 10, 2024 20:56
Copy link
Collaborator

@nrichers nrichers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noosheenv re-reviewed and this looks good, except the new CI check runs even when the PR is in draft mode:

image

You can see in the screenshot that the release notes check was skipped — that's how it should be.

.github/workflows/render-site.yaml Outdated Show resolved Hide resolved
@noosheenv
Copy link
Contributor Author

@nrichers I seeeeee I needed an if statement under the build to skip if the PR is a draft. Should be resolved with this commit: cbabceb

@nrichers nrichers marked this pull request as ready for review July 10, 2024 21:19
@nrichers nrichers added the infrastructure Docs infra changes label Jul 10, 2024
Copy link
Collaborator

@nrichers nrichers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! (Looks GREAT to me.) Retested and your new GitHub workflow works as expected, including skipping when the PR is in draft mode. SHIP IT. 🚢

@noosheenv noosheenv merged commit a4d68c7 into main Jul 10, 2024
@noosheenv noosheenv deleted the noosheenvazinkhoo/sc-5241/create-github-action-to-run-quarto-render branch July 10, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Docs infra changes internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.