Skip to content

Commit

Permalink
Disable profiling page build on pull requests (#2048)
Browse files Browse the repository at this point in the history
  • Loading branch information
epassaro authored Jun 14, 2022
1 parent bafd7fc commit 16f5963
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ jobs:
- name: Install package
run: pip install -e .

- name: Set profiling option
run: |
if [[ $EVENT == pull_request_target ]]; then
echo "DISABLE_PROFILING=1" >> $GITHUB_ENV
else
echo "DISABLE_PROFILING=0" >> $GITHUB_ENV
fi
cat $GITHUB_ENV
env:
EVENT: ${{ github.event_name }}

- name: Build documentation
run: cd docs/ && make html CORES=auto

Expand Down
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
exclude_patterns.append("resources/research_done_using_TARDIS/ads.ipynb")
exclude_patterns.append("physics/energy_input/gammaray_deposition.ipynb")

if os.getenv("DISABLE_PROFILING"):
exclude_patterns.append("contributing/development/profiling/**.ipynb")

# This is added to the end of RST files - a good place to put substitutions to
# be used globally.
rst_epilog = """
Expand Down

0 comments on commit 16f5963

Please sign in to comment.