Skip to content

Commit

Permalink
Move tutorial fetch to different job in fetch GH workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed Dec 5, 2024
1 parent 1a5119a commit 357a77a
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/fetch_filter_resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 357a77a

Please sign in to comment.