Skip to content

Commit 4f9675b

Browse files
authored
Disuse GitHub artifacts in publish-docs.yaml. Regenerate files directly. (#2225)
2 parents dd9e4af + 61b0ecb commit 4f9675b

File tree

1 file changed

+16
-48
lines changed

1 file changed

+16
-48
lines changed

.github/workflows/publish-docs.yaml

Lines changed: 16 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -29,49 +29,19 @@ jobs:
2929
with:
3030
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'
3131

32-
- name: Get released workflow run id
33-
id: released-workflow
34-
uses: actions/github-script@v7
35-
with:
36-
script: |
37-
let res = await github.rest.actions.listWorkflowRuns({
38-
owner: context.repo.owner,
39-
repo: context.repo.repo,
40-
workflow_id: 'ci-nix.yaml',
41-
branch: 'release',
42-
status: 'success'
43-
});
44-
return res.data.workflow_runs[0].id;
45-
46-
- name: Get latest workflow run id
47-
id: latest-workflow
48-
uses: actions/github-script@v7
49-
with:
50-
script: |
51-
let res = await github.rest.actions.listWorkflowRuns({
52-
owner: context.repo.owner,
53-
repo: context.repo.repo,
54-
workflow_id: 'ci-nix.yaml',
55-
branch: 'master',
56-
status: 'success'
57-
});
58-
return res.data.workflow_runs[0].id;
59-
60-
- name: 📥 Download released benchmarks
61-
uses: actions/download-artifact@v5
62-
with:
63-
github-token: ${{ secrets.GITHUB_TOKEN || github.token }}
64-
run-id: ${{steps.released-workflow.outputs.result}}
65-
pattern: benchmarks-*
66-
merge-multiple: true
67-
path: docs/benchmarks
68-
6932
- name: Build documentation
7033
working-directory: docs
7134
run: |
7235
nix build .#docs
7336
74-
cp result/build /tmp/public/head-protocol -r
37+
export out=/tmp/public/head-protocol
38+
mkdir -p $out
39+
cp result/build/* $out -r
40+
41+
nix develop .#hydra-node-bench --command -- tx-cost --output-directory $out/benchmarks/
42+
nix develop .#hydra-node-bench --command -- micro -o $out/benchmarks/ledger-bench.html
43+
nix develop .#hydra-cluster-bench --command -- bench-e2e datasets datasets/1-node.json datasets/3-nodes.json --output-directory $out/benchmarks
44+
7545
# Clean the working copy
7646
git clean -dxf
7747

@@ -81,21 +51,19 @@ jobs:
8151
git reset origin/master --hard
8252
sed -i 's|head-protocol|head-protocol/unstable|' docusaurus.config.js
8353
84-
- name: 📥 Download latest benchmarks
85-
uses: actions/download-artifact@v5
86-
with:
87-
github-token: ${{ secrets.GITHUB_TOKEN || github.token }}
88-
run-id: ${{steps.latest-workflow.outputs.result}}
89-
pattern: benchmarks-*
90-
merge-multiple: true
91-
path: docs/benchmarks
92-
9354
- name: Build /unstable documentation
9455
working-directory: docs
9556
run: |
9657
nix build .#docs
9758
98-
cp result/build /tmp/public/head-protocol/unstable/ -r
59+
export out=/tmp/public/head-protocol/unstable
60+
mkdir -p $out
61+
cp result/build/* $out -r
62+
63+
nix develop .#hydra-node-bench --command -- tx-cost --output-directory $out/benchmarks/
64+
nix develop .#hydra-node-bench --command -- micro -o $out/benchmarks/ledger-bench.html
65+
nix develop .#hydra-cluster-bench --command -- bench-e2e datasets datasets/1-node.json datasets/3-nodes.json --output-directory $out/benchmarks
66+
9967

10068
- name: 👉 Create redirects
10169
run: |

0 commit comments

Comments
 (0)