From b65b59d46c17e03fa2162fee61b5ebe668e0b4db Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Mon, 12 Sep 2022 15:21:34 -0600 Subject: [PATCH] consolidate docs CI workflows in main branch - repurpose Deploy Docs as scheduler - repurpose Rebuild Search Index as scheduler --- .github/workflows/deploy-docs.yml | 20 ++++++++++++++--- .github/workflows/rebuild-search-index.yml | 18 ++++++++++++--- .github/workflows/trigger-deploy-docs.yml | 22 ------------------- .../trigger-rebuild-search-index.yml | 20 ----------------- 4 files changed, 32 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows/trigger-deploy-docs.yml delete mode 100644 .github/workflows/trigger-rebuild-search-index.yml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 1b16b1678a..3e23827507 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,8 +1,22 @@ name: Deploy Docs on: + repository_dispatch: + types: request-build-reference # legacy + schedule: + - cron: '0 10 * * *' # Once per day at 10am UTC workflow_dispatch: +permissions: read-all jobs: - register: - if: false + build: + runs-on: ubuntu-latest + if: github.repository_owner == 'spring-projects' steps: - - run: echo Workflow registered! + - name: Checkout + uses: actions/checkout@v2 + with: + ref: docs-build + fetch-depth: 1 + - name: Dispatch + run: gh workflow run --ref $(git rev-parse --abbrev-ref HEAD) deploy-docs.yml + env: + GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} diff --git a/.github/workflows/rebuild-search-index.yml b/.github/workflows/rebuild-search-index.yml index 0b266d2f07..855bd3e192 100644 --- a/.github/workflows/rebuild-search-index.yml +++ b/.github/workflows/rebuild-search-index.yml @@ -1,8 +1,20 @@ name: Rebuild Search Index on: + schedule: + - cron: '0 10 * * *' # Once per day at 10am UTC workflow_dispatch: +permissions: read-all jobs: - register: - if: false + build: + runs-on: ubuntu-latest + if: github.repository_owner == 'spring-projects' steps: - - run: echo Workflow registered! + - name: Checkout + uses: actions/checkout@v2 + with: + ref: docs-build + fetch-depth: 1 + - name: Dispatch + run: gh workflow run --ref $(git rev-parse --abbrev-ref HEAD) rebuild-search-index.yml + env: + GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} diff --git a/.github/workflows/trigger-deploy-docs.yml b/.github/workflows/trigger-deploy-docs.yml deleted file mode 100644 index 0a57dd0465..0000000000 --- a/.github/workflows/trigger-deploy-docs.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Trigger Deploy Docs -on: - repository_dispatch: - types: request-build-reference # legacy - schedule: - - cron: '0 10 * * *' # Once per day at 10am UTC - workflow_dispatch: -permissions: read-all -jobs: - build: - runs-on: ubuntu-latest - if: github.repository_owner == 'spring-projects' - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: docs-build - fetch-depth: 1 - - name: Dispatch - run: gh workflow run --ref $(git rev-parse --abbrev-ref HEAD) deploy-docs.yml - env: - GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} diff --git a/.github/workflows/trigger-rebuild-search-index.yml b/.github/workflows/trigger-rebuild-search-index.yml deleted file mode 100644 index acf1288845..0000000000 --- a/.github/workflows/trigger-rebuild-search-index.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Trigger Rebuild Search Index -on: - schedule: - - cron: '0 10 * * *' # Once per day at 10am UTC - workflow_dispatch: -permissions: read-all -jobs: - build: - runs-on: ubuntu-latest - if: github.repository_owner == 'spring-projects' - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: docs-build - fetch-depth: 1 - - name: Dispatch - run: gh workflow run --ref $(git rev-parse --abbrev-ref HEAD) rebuild-search-index.yml - env: - GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}