File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 5
5
branches :
6
6
- ' main'
7
7
- ' analysis/**'
8
+ - ' test-docs'
8
9
9
10
jobs :
10
11
algorithms :
Original file line number Diff line number Diff line change @@ -40,16 +40,34 @@ jobs:
40
40
pip install -r requirements.txt
41
41
42
42
# Action to download artifacts from a different workflow (analysis.yml)
43
- - name : Download figures artifact
44
- uses : dawidd6/action-download-artifact@v3
43
+ - name : ' Download artifact'
44
+ uses : actions/github-script@v6
45
45
with :
46
- workflow : analysis.yml
47
- name : Figures
48
- branch : main
46
+ script : |
47
+ let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
48
+ owner: context.repo.owner,
49
+ repo: context.repo.repo,
50
+ run_id: context.payload.workflow_run.id,
51
+ });
52
+ let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
53
+ return artifact.name == "Figures"
54
+ })[0];
55
+ let download = await github.rest.actions.downloadArtifact({
56
+ owner: context.repo.owner,
57
+ repo: context.repo.repo,
58
+ artifact_id: matchArtifact.id,
59
+ archive_format: 'zip',
60
+ });
61
+ let fs = require('fs');
62
+ fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/Figures.zip`, Buffer.from(download.data));
63
+
64
+ - name : ' Unzip artifact'
65
+ run : unzip Figures.zip
49
66
50
67
- name : Build html
51
68
run : |
52
69
mkdir docs/_static
70
+ ls
53
71
mv *.pdf docs/_static/
54
72
sphinx-apidoc -o docs src
55
73
cd docs/
You can’t perform that action at this time.
0 commit comments