Skip to content

Commit

Permalink
doc: Don't download external resources for PRs
Browse files Browse the repository at this point in the history
The privacy plugin downloads external resources (like fonts).
This is not necessary for PRs as these builds are not published.
  • Loading branch information
abhinav committed Aug 24, 2024
1 parent f13b96a commit f41da04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
working-directory: doc
env:
CLOUDFLARE_ANALYTICS_TOKEN: ${{ secrets.CLOUDFLARE_ANALYTICS_TOKEN }}
MAIN_BUILD: ${{ github.ref == 'refs/heads/main' }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
4 changes: 3 additions & 1 deletion doc/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ exclude_docs: |
plugins:
- markdown-exec
- privacy:
enabled: !ENV [CI, false]
# Don't download external resources in CI,
# except for main builds.
enabled: !ENV [MAIN_BUILD, false]
- redirects:
redirect_maps:
'how-to.md': 'recipes.md'
Expand Down

0 comments on commit f41da04

Please sign in to comment.