Skip to content

Commit 0d7c738

Browse files
committed
Try out new GHA
1 parent 0150e5c commit 0d7c738

File tree

3 files changed

+111
-14
lines changed

3 files changed

+111
-14
lines changed

.github/workflows/documentation.yaml

Lines changed: 71 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,84 @@ jobs:
4242
REQUIREMENTS: docs/doc-requirements.txt
4343

4444

45-
docs-build:
46-
name: "Test docs build"
47-
runs-on: ubuntu-22.04
48-
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/main' }}
4945

46+
47+
48+
retrieve-tasks-data:
49+
runs-on: ubuntu-latest
50+
5051
steps:
52+
53+
# Build mkdocs
54+
55+
- uses: actions/setup-python@v4
56+
with:
57+
python-version: '3.11'
58+
cache: pip
59+
60+
- name: Install dependencies
61+
run: python -m pip install -r requirements.txt
62+
63+
- name: MKDocs build
64+
run: mkdocs build --config-file mkdocs.yml --strict
65+
66+
# Fetch tasks data
67+
5168
- uses: actions/checkout@v4
69+
with:
70+
fetch-depth: 1
5271

5372
- uses: actions/setup-python@v5
5473
with:
55-
python-version: '3.10'
74+
python-version: 3.11
5675
cache: pip
5776

5877
- name: Install requirements
59-
run: python -m pip install -r requirements.txt
78+
run: python3 -m pip install -r tasks/data_retrieval/requirements.txt
6079

61-
- name: MKDocs build
62-
run: mkdocs build --config-file mkdocs.yml
80+
- name: Fetch tasks data
81+
run: python3 -u tasks/data_retrieval/create_tasks_data.py
82+
83+
- run: cat tasks/data_retrieval/tasks_data.json
84+
85+
86+
# Build tasks-list page
87+
88+
- name: Get package source code
89+
uses: actions/checkout@v4
90+
with:
91+
repository: fractal-analytics-platform/fractal-web
92+
93+
- name: Set up node
94+
uses: actions/setup-node@v4
95+
with:
96+
node-version: 20
97+
cache: npm
98+
99+
- name: Install components dependencies
100+
run: |
101+
cd fractal-web/components
102+
npm install
103+
104+
- name: Install tasks-list dependencies
105+
run: |
106+
cd fractal-web/tasks-list
107+
npm install
108+
109+
- name: Move tasks.json file to fractal-web/tasks-list/src
110+
- run: mv tasks/data_retrieval/tasks_data.json fractal-web/tasks-list/src/tasks.json
111+
112+
- name: Build tasks-list
113+
run: |
114+
cd fractal-web/tasks-list
115+
npm run build
116+
117+
- name: Move tasks-list built files in docs site
118+
run: mv fractal-web/tasks-list/build/ site/fractal-tasks
119+
120+
- name: Deploy docs
121+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
122+
uses: peaceiris/actions-gh-pages@v4
123+
with:
124+
github_token: ${{ secrets.GITHUB_TOKEN }}
125+
publish_dir: ./site

.github/workflows/task_list.yaml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16+
17+
# Fetch data
18+
1619
- uses: actions/checkout@v4
1720
with:
1821
fetch-depth: 1
@@ -28,4 +31,39 @@ jobs:
2831
- name: Fetch tasks data
2932
run: python3 -u tasks/data_retrieval/create_tasks_data.py
3033

31-
- run: cat tasks/data_retrieval/tasks_data.json
34+
- run: cat tasks/data_retrieval/tasks_data.json
35+
36+
- run: cp tasks/data_retrieval/tasks_data.json tasks.json
37+
38+
# Build tasks-list page
39+
40+
- name: Get package source code
41+
uses: actions/checkout@v4
42+
with:
43+
repository: fractal-analytics-platform/fractal-web
44+
45+
- name: Set up node
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: 20
49+
cache: npm
50+
51+
- name: Install components dependencies
52+
run: |
53+
cd fractal-web/components
54+
npm install
55+
56+
- name: Install task-list dependencies
57+
run: |
58+
cd fractal-web/task-list
59+
npm install
60+
61+
- name: Move tasks.json file
62+
63+
- name: Build task-list
64+
run: |
65+
cd fractal-web/task-list
66+
npm run build
67+
68+
- name: Move sandbox built files in docs site
69+
run: mv fractal-web/task-list/build/ site/fractal-tasks

tasks/data_retrieval/sources.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
# PyPI
21
https://pypi.org/project/fractal-tasks-core/
32
https://pypi.org/project/fractal-faim-ipa
43
https://pypi.org/project/fractal-lif-converters
54
https://pypi.org/project/operetta-compose
5+
https://github.com/fractal-analytics-platform/fractal-helper-tasks
66

7-
# GitHub releases with wheels
8-
https://github.com/fractal-analytics-platform/fractal-lif-converters/
97

10-
11-
# https://github.com/fractal-analytics-platform/fractal-helper-tasks
128
# https://github.com/fmi-basel/gliberal-scMultipleX
139
# https://github.com/Apricot-Therapeutics/APx_fractal_task_collection
1410
# https://github.com/fractal-analytics-platform/fractal-plantseg-tasks

0 commit comments

Comments
 (0)