diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 22a9d1369c6..e7bf25afaed 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -2,23 +2,26 @@ # # https://tardis-sn.github.io/tardis/contributing/development/continuous_integration.html -name: docs +name: docs-debug on: push: branches: - master - - pull_request_target: + pull_request: branches: - master - types: - - opened - - reopened - - synchronize - - labeled # requires the `build-docs` label - - ready_for_review + # pull_request_target: + # branches: + # - master + + # types: + # - opened + # - reopened + # - synchronize + # - labeled # requires the `build-docs` label + # - ready_for_review workflow_dispatch: # manual trigger @@ -27,58 +30,58 @@ env: DEPLOY_BRANCH: gh-pages # deployed docs branch HDF5_USE_FILE_LOCKING: "FALSE" # disable file locking -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} +# cancel-in-progress: true defaults: run: - shell: bash -l {0} + shell: bash -el {0} jobs: - check-for-changes: - runs-on: ubuntu-latest - if: ${{ !github.event.pull_request.draft }} - outputs: - trigger-check-outcome: ${{ steps.trigger_check.outcome }} - docs-check-outcome: ${{ steps.docs_check.outcome }} - steps: - - uses: actions/checkout@v4 - if: github.event_name != 'pull_request_target' - - - name: Checkout pull/${{ github.event.number }} - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.sha }} - if: github.event_name == 'pull_request_target' - - - name: Check for trigger by push event, manual dispatch, build-docs label on a PR - id: trigger_check - if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'build-docs') - run: | - echo "Building docs as a test." - exit 0 - continue-on-error: true - - - name: Check for changes in documentation - run: | - if git diff origin/master..."$(git rev-parse --abbrev-ref HEAD)" --name-only | cat | grep '^docs/' | grep -q .; then - num_files=$(git diff --name-only origin/master...HEAD | grep '^docs/' | wc -l) - echo "Changes found in documentation files: $num_files" - exit 0 - else - echo "No changes found in documentation files - will stop running the pipeline." - exit 1 - fi - id: docs_check - if: steps.trigger_check.outcome != 'success' - continue-on-error: true + # check-for-changes: + # runs-on: ubuntu-latest + # if: ${{ !github.event.pull_request.draft }} + # outputs: + # trigger-check-outcome: ${{ steps.trigger_check.outcome }} + # docs-check-outcome: ${{ steps.docs_check.outcome }} + # steps: + # - uses: actions/checkout@v4 + # if: github.event_name != 'pull_request_target' + + # - name: Checkout pull/${{ github.event.number }} + # uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # ref: ${{ github.event.pull_request.head.sha }} + # if: github.event_name == 'pull_request_target' + + # - name: Check for trigger by push event, manual dispatch, build-docs label on a PR + # id: trigger_check + # if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'build-docs') + # run: | + # echo "Building docs as a test." + # exit 0 + # continue-on-error: true + + # - name: Check for changes in documentation + # run: | + # if git diff origin/master..."$(git rev-parse --abbrev-ref HEAD)" --name-only | cat | grep '^docs/' | grep -q .; then + # num_files=$(git diff --name-only origin/master...HEAD | grep '^docs/' | wc -l) + # echo "Changes found in documentation files: $num_files" + # exit 0 + # else + # echo "No changes found in documentation files - will stop running the pipeline." + # exit 1 + # fi + # id: docs_check + # if: steps.trigger_check.outcome != 'success' + # continue-on-error: true build-docs: runs-on: ubuntu-latest - needs: check-for-changes - if: needs.check-for-changes.outputs.trigger-check-outcome == 'success' || needs.check-for-changes.outputs.docs-check-outcome == 'success' + # needs: check-for-changes + # if: needs.check-for-changes.outputs.trigger-check-outcome == 'success' || needs.check-for-changes.outputs.docs-check-outcome == 'success' steps: - uses: actions/checkout@v4 if: github.event_name != 'pull_request_target' @@ -98,10 +101,14 @@ jobs: sparse-checkout: | atom_data/kurucz_cd23_chianti_H_He.h5 - - name: Setup environment - uses: ./.github/actions/setup_env + - uses: mamba-org/setup-micromamba@v2 with: - os-label: linux-64 + environment-file: tardis-env3.yml + environment-name: tardis + init-shell: bash + post-cleanup: 'all' + # cache-environment: true + # cache-downloads: true - name: Copy atom_data run: | diff --git a/tardis_env3.yml b/tardis_env3.yml index 45dd09de7c6..4d8acb8f8b7 100644 --- a/tardis_env3.yml +++ b/tardis_env3.yml @@ -33,7 +33,7 @@ dependencies: - tqdm # Widgets & Visualization - - notebook=6.5.7 + - notebook=7.3.0 - matplotlib-base - ipywidgets - plotly