From 357a77a362e9f9101692b8499d933c8e7aed1b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9r=C3=A9nice=20Batut?= Date: Thu, 5 Dec 2024 12:40:31 +0100 Subject: [PATCH] Move tutorial fetch to different job in fetch GH workflow --- .github/workflows/fetch_filter_resources.yaml | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/.github/workflows/fetch_filter_resources.yaml b/.github/workflows/fetch_filter_resources.yaml index b5aced85..65dc2189 100644 --- a/.github/workflows/fetch_filter_resources.yaml +++ b/.github/workflows/fetch_filter_resources.yaml @@ -70,9 +70,34 @@ jobs: with: name: tools-${{ matrix.subset }} path: communities/all/resources/${{ matrix.subset }}_tools.* + fetch-tutorials: + runs-on: ubuntu-20.04 + name: Fetch tutorials + steps: + - name: Checkout main + uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install requirement + run: | + python -m pip install -r requirements.txt + sudo apt-get install jq + - name: Fetch all tutorials + run: | + bash sources/bin/extract_all_tutorials.sh + env: + PLAUSIBLE_API_KEY: ${{ secrets.PLAUSIBLE_API_TOKEN }} + - name: Archive tutorials artifacts + uses: actions/upload-artifact@v4 + with: + name: tutorials + path: communities/all/resources/tutorials.json merge-fetch-filter: runs-on: ubuntu-20.04 - needs: fetch-tools-stepwise + needs: + - fetch-tools-stepwise + - fetch-tutorials name: Merge tools, fetch tutorials and filter the resources for communities steps: - name: Checkout main @@ -90,6 +115,12 @@ jobs: pattern: tools-* merge-multiple: true path: communities/all/resources/ + - name: Download stepwise tool lists + uses: actions/download-artifact@v4 + with: + pattern: tutorials + merge-multiple: true + path: communities/all/resources/ - name: Display structure of downloaded files run: ls -R communities/all/resources/ - name: Merge all tools @@ -107,11 +138,6 @@ jobs: - name: Filter workflows for communities run: | bash sources/bin/get_community_workflows.sh - - name: Fetch all tutorials - run: | - bash sources/bin/extract_all_tutorials.sh - env: - PLAUSIBLE_API_KEY: ${{ secrets.PLAUSIBLE_API_TOKEN }} - name: Filter tutorials for communities run: | bash sources/bin/get_community_tutorials.sh