From 5f99fda597dace13d91b2cb7dd97692d503e8638 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Sun, 9 Jul 2023 14:11:57 -0500 Subject: [PATCH 1/2] Limit documentation deployment --- .github/workflows/documentation.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 99966351..9b652fdb 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -46,11 +46,11 @@ jobs: run: poetry run bash scripts/build-docs.sh - name: Deploy + if: | + github.event_name != 'push' + && github.ref == 'refs/heads/main' + && github.repository == 'nsidc/earthaccess' uses: peaceiris/actions-gh-pages@v3 with: - EARTHDATA_USERNAME: ${{ secrets.EDL_USERNAME }} - EARTHDATA_PASSWORD: ${{ secrets.EDL_PASSWORD }} - EARTHACCESS_TEST_USERNAME: ${{ secrets.EDL_USERNAME }} - EARTHACCESS_TEST_PASSWORD: ${{ secrets.EDL_PASSWORD }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./site From 2421dc1e000499821ef5078dd1a386b0aaeda094 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Sun, 9 Jul 2023 14:15:06 -0500 Subject: [PATCH 2/2] Run documentation CI job when changes are made to the GHA wofklow file --- .github/workflows/documentation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 9b652fdb..9bb0b782 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -11,12 +11,14 @@ on: - tests/** - docs/** - notebooks/** + - .github/workflows/documentation.yml pull_request: paths: - earthaccess/** - tests/** - docs/** - notebooks/** + - .github/workflows/documentation.yml types: [opened, synchronize] jobs: