Skip to content

Commit cf80554

Browse files
authored
ci: change docs generation (#212)
* ci: change docs generation * ci: change test running notebooks
1 parent 7e4c793 commit cf80554

File tree

4 files changed

+116
-0
lines changed

4 files changed

+116
-0
lines changed

.github/workflows/ci-dev.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,35 @@ jobs:
2121
- uses: actions/checkout@v4
2222
with:
2323
token: ${{ secrets.CICD_PAT_TOKEN }}
24+
- name: Get Google access token
25+
id: google-access-token
26+
uses: playeveryware/action-google-access-token@v1
27+
with:
28+
credentials: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_CREDENTIALS }}
29+
scope: 'https://www.googleapis.com/auth/drive.readonly'
30+
- name: Download file from Google drive
31+
uses: playeveryware/action-google-drive-download@v1
32+
with:
33+
token: ${{ steps.google-access-token.outputs.token }}
34+
file-id: 1LxapCQ07CdUsCmTSWnUMMNUioc777pk6
35+
path: example_files.zip
36+
- name: Extract zip files
37+
uses: ihiroky/extract-action@v1
38+
with:
39+
file_path: example_files.zip
40+
extract_dir: 'example_files'
41+
- uses: jannekem/run-python-script-action@v1
42+
name: Move files and remove zip
43+
with:
44+
script: |
45+
from pathlib import Path
46+
src_dir = Path("example_files")
47+
for each_file in src_dir.rglob('*.*'):
48+
trg_path = Path.cwd().joinpath(each_file.relative_to(src_dir))
49+
print("Moving file", each_file, trg_path)
50+
trg_path.parent.mkdir(exist_ok=True, parents=True)
51+
each_file.rename(trg_path)
52+
Path('example_files.zip').unlink()
2453
- name: Setup Python
2554
uses: actions/setup-python@v4
2655
with:

.github/workflows/ci-prod.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,35 @@ jobs:
4646
- uses: actions/checkout@v4
4747
with:
4848
token: ${{ secrets.CICD_PAT_TOKEN }}
49+
- name: Get Google access token
50+
id: google-access-token
51+
uses: playeveryware/action-google-access-token@v1
52+
with:
53+
credentials: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_CREDENTIALS }}
54+
scope: 'https://www.googleapis.com/auth/drive.readonly'
55+
- name: Download file from Google drive
56+
uses: playeveryware/action-google-drive-download@v1
57+
with:
58+
token: ${{ steps.google-access-token.outputs.token }}
59+
file-id: 1LxapCQ07CdUsCmTSWnUMMNUioc777pk6
60+
path: example_files.zip
61+
- name: Extract zip files
62+
uses: ihiroky/extract-action@v1
63+
with:
64+
file_path: example_files.zip
65+
extract_dir: 'example_files'
66+
- uses: jannekem/run-python-script-action@v1
67+
name: Move files and remove zip
68+
with:
69+
script: |
70+
from pathlib import Path
71+
src_dir = Path("example_files")
72+
for each_file in src_dir.rglob('*.*'):
73+
trg_path = Path.cwd().joinpath(each_file.relative_to(src_dir))
74+
print("Moving file", each_file, trg_path)
75+
trg_path.parent.mkdir(exist_ok=True, parents=True)
76+
each_file.rename(trg_path)
77+
Path('example_files.zip').unlink()
4978
- name: Setup Python
5079
uses: actions/setup-python@v4
5180
with:

.github/workflows/generate-dev-docs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,35 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
token: ${{ secrets.CICD_PAT_TOKEN }}
19+
- name: Get Google access token
20+
id: google-access-token
21+
uses: playeveryware/action-google-access-token@v1
22+
with:
23+
credentials: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_CREDENTIALS }}
24+
scope: 'https://www.googleapis.com/auth/drive.readonly'
25+
- name: Download file from Google drive
26+
uses: playeveryware/action-google-drive-download@v1
27+
with:
28+
token: ${{ steps.google-access-token.outputs.token }}
29+
file-id: 1LxapCQ07CdUsCmTSWnUMMNUioc777pk6
30+
path: example_files.zip
31+
- name: Extract zip files
32+
uses: ihiroky/extract-action@v1
33+
with:
34+
file_path: example_files.zip
35+
extract_dir: 'example_files'
36+
- uses: jannekem/run-python-script-action@v1
37+
name: Move files and remove zip
38+
with:
39+
script: |
40+
from pathlib import Path
41+
src_dir = Path("example_files")
42+
for each_file in src_dir.rglob('*.*'):
43+
trg_path = Path.cwd().joinpath(each_file.relative_to(src_dir))
44+
print("Moving file", each_file, trg_path)
45+
trg_path.parent.mkdir(exist_ok=True, parents=True)
46+
each_file.rename(trg_path)
47+
Path('example_files.zip').unlink()
1948
- name: Setup Python
2049
uses: actions/setup-python@v4
2150
with:

.github/workflows/manual_tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,35 @@ jobs:
151151
- uses: actions/checkout@v4
152152
with:
153153
token: ${{ secrets.CICD_PAT_TOKEN }}
154+
- name: Get Google access token
155+
id: google-access-token
156+
uses: playeveryware/action-google-access-token@v1
157+
with:
158+
credentials: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_CREDENTIALS }}
159+
scope: 'https://www.googleapis.com/auth/drive.readonly'
160+
- name: Download file from Google drive
161+
uses: playeveryware/action-google-drive-download@v1
162+
with:
163+
token: ${{ steps.google-access-token.outputs.token }}
164+
file-id: 1LxapCQ07CdUsCmTSWnUMMNUioc777pk6
165+
path: example_files.zip
166+
- name: Extract zip files
167+
uses: ihiroky/extract-action@v1
168+
with:
169+
file_path: example_files.zip
170+
extract_dir: 'example_files'
171+
- uses: jannekem/run-python-script-action@v1
172+
name: Move files and remove zip
173+
with:
174+
script: |
175+
from pathlib import Path
176+
src_dir = Path("example_files")
177+
for each_file in src_dir.rglob('*.*'):
178+
trg_path = Path.cwd().joinpath(each_file.relative_to(src_dir))
179+
print("Moving file", each_file, trg_path)
180+
trg_path.parent.mkdir(exist_ok=True, parents=True)
181+
each_file.rename(trg_path)
182+
Path('example_files.zip').unlink()
154183
- name: Setup Python
155184
uses: actions/setup-python@v4
156185
with:

0 commit comments

Comments
 (0)