This repository uses different workflows to automatically updates the published websites
- https://quarto.org/ - The documentation for Quarto, published from the
mainbranch - https://prerelease.quarto.org/ - The documentation for Quarto prerelease, published from the
prereleasebranch
It also configures some website preview for pull requests, which are published to Netlify as deploy previews. The use non-production deploy and can be consulted to deploy-preview-<PR number>.quarto.org.
Note that technically, <prerelease.quarto.org> is also a deploy preview on Netlify (non-production website) but with a fixed URL.
-
publish.yml- The workflow that publishes the documentation frommainandprereleasebranches to netlify.- For stable release version, the doc is deployed from
main, and published usingquarto publish netlifycommand to production website on Netlify. - For prerelease version, the doc is deployed from
prerelease, and published using Github Actionnwtgck/actions-netlifywhich use Netlify API to deploy to a non-production website on Netlify. The prerelease website is build using a specific profile at render time, set in action usingQUARTO_PROFILEenvironment variable.
- For stable release version, the doc is deployed from
-
preview.yml- The workflow that creates a deploy preview for pull requests. It uses the same actionnwtgck/actions-netlifyto deploy to a non-production website on Netlify. The URL isdeploy-preview-<PR number>.quarto.org.- PR previews are configured for any PR to
mainorprereleasebranches. - They are automically created and updated when the PR is created and updated by a user with Contributor role.
- For external PR, the preview can be triggered by adding a comment
/deploy-previewon the PR. - Any rendering to prerelease also uses a specific profile at render time, set in action using
QUARTO_PROFILEenvironment variable. - Deploy previews use the
pr-previewprofile (_quarto-pr-preview.yml) which setsdraft-mode: visibleso that draft blog posts and pages are rendered and visible in PR previews. This is needed becausequarto render(used in CI) hides drafts by default, unlikequarto preview(used locally) which always shows them.
- PR previews are configured for any PR to
-
update-downloads.yml- This workflow is triggered by a cron schedule. It retrieves information about latest release and prerelease onquarto-dev/quarto-clirepository and updates the download links on the website.- If there is a new version detected, it will commit the modified files and trigger a deploy of the website calling
publish.ymlworkflow withworkflow_callevent trigger. - This applies to both
mainandprereleasebranches- For
mainbranch, we usestefanzweifel/git-auto-commit-actionto detect changes and commit them to themainbranch - For
prereleasebranch, we usegit cherry-pickthe commit from main following previous above step. - Then we trigger the
publish.ymlworkflow withworkflow_callevent trigger for each of the branch.
- For
- If there is a new version detected, it will commit the modified files and trigger a deploy of the website calling
-
upload-index.yml- This workflow is triggered by a cron schedule. It updates the indexes for Algolia search engine, which powers the sites search.search.jsonis built when the website is rendered and then it is deployed to the website.- This index file is retrieved on deployed website to be updated on Algolia.
- Both
quarto.organdprerelease.quarto.orgindexes are updated in the same run - they each use one specific algolia index
-
draft-check.yml- A lightweight workflow that detectsdraft: truepages among changed.qmdfiles. Runs on all PRs tomainandprereleasewith nopaths-ignore, so it always creates a status check.- Uses the reusable composite action at
.github/workflows/actions/detect-drafts/. - Configured as a required status check on
main(check-draftsjob), blocking merge untildraft: trueis removed. - Admin override is available for intentional draft merges.
- Uses the reusable composite action at
-
port-to-prerelease.yml- This workflow is used to sync changes made to main for quarto.org to prerelease branch for prerelease.quarto.org.- It is triggered when a PR is merged in to
main. It can also be triggered manually by adding a comment/sync-prereleaseon a merged PR. - This workflow uses
korthout/backport-actionto create a PR with the changes merged intomainbranch to be synced toprereleasebranch. - It will also write a new
/deploy-previewcomment in the new PR to trigger the preview deployment frompreview.yml. - This is possible because it uses a fine-grained PAT token which allows a workflow to trigger another using usual event (GITHUB_TOKEN does not allow that usually). This is configured in repo secrets.
- It is triggered when a PR is merged in to
Local composite actions live in .github/workflows/actions/:
detect-drafts/- Scans changed.qmdfiles fordraft: truein YAML frontmatter. Outputsfound(true/false) andfiles(newline-separated paths). Used by bothpreview.yml(to tag drafts in the PR comment) anddraft-check.yml(to fail the required check).release-info/- Retrieves release information from the quarto-cli repository.
- This repo has a
_redirectsfile in the root directory. Otherwise, configuration are made in NETLIFY UI. Quarto website is inside Posit Netlify account. - Automatic builds are turned off for this repo on Netlify because we currently need to render with Quarto CLI in Gihub Action CI before publishing the results.
- API deploy is used currently, using npm netlify package through
nwtgck/actions-netlifygithub actions. One think to know: Netlify has removeddeploy()function from its npm package in version 7 and recommends now to use Netlify CLI instead. But we are still using the package for now in CI, but also forquarto publish netlify. - Deploy previews are possible with manual deploy using an alias configuration for the deploy command; This allows us to
deploy-preview-<PR number>andprereleasealias to be used for the deploy previews. - This means our netlify website don't use automatic builds and automatic Branch deploy - Only deploy previews.
- The website uses Automatic Deploy Subdomains to have
prerelease.quarto.orgordeploy-preview-<PR number>.quarto.orgworking.
- API deploy is used currently, using npm netlify package through
quarto.orgis registered in external registrar, but associated with Netlify DNS allowing use to use custom domains.