Skip to content

Commit 8dd3744

Browse files
committed
Merge branch 'p/38220/fix-netlify-deployment' into p/38220/fix-netlify-deployment-TEST
2 parents 4f91a05 + ce2a11f commit 8dd3744

File tree

3 files changed

+13
-41
lines changed

3 files changed

+13
-41
lines changed

.github/workflows/doc-build-pdf.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144

145145
- name: Upload docs
146146
if: (success() || failure()) && steps.copy.outcome == 'success'
147-
uses: actions/upload-artifact@v3
147+
uses: actions/upload-artifact@v4
148148
with:
149149
name: docs-pdf
150150
path: docs-pdf.zip

.github/workflows/doc-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ jobs:
187187
188188
- name: Upload docs
189189
if: (success() || failure()) && steps.copy.outcome == 'success'
190-
uses: actions/upload-artifact@v3
190+
uses: actions/upload-artifact@v4
191191
with:
192192
name: docs
193193
path: docs.zip
@@ -225,7 +225,7 @@ jobs:
225225

226226
- name: Upload live doc
227227
if: (success() || failure()) && steps.copylivedoc.outcome == 'success'
228-
uses: actions/upload-artifact@v3
228+
uses: actions/upload-artifact@v4
229229
with:
230230
name: livedoc
231231
path: livedoc.zip

.github/workflows/doc-publish.yml

+10-38
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,13 @@ jobs:
2525
token: ${{ secrets.GITHUB_TOKEN }}
2626
sourceRunId: ${{ github.event.workflow_run.id }}
2727

28-
# Once https://github.com/actions/download-artifact/issues/172 and/or https://github.com/actions/download-artifact/issues/60 is implemented, we can use the official download-artifact action
29-
# For now use the solution from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow
3028
- name: Download docs
31-
uses: actions/[email protected]
29+
- uses: actions/download-artifact@v4
3230
with:
33-
script: |
34-
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
35-
owner: context.repo.owner,
36-
repo: context.repo.repo,
37-
run_id: ${{github.event.workflow_run.id }},
38-
});
39-
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
40-
return artifact.name == "docs"
41-
})[0];
42-
var download = await github.rest.actions.downloadArtifact({
43-
owner: context.repo.owner,
44-
repo: context.repo.repo,
45-
artifact_id: matchArtifact.id,
46-
archive_format: 'zip',
47-
});
48-
var fs = require('fs');
49-
fs.writeFileSync('${{github.workspace}}/docs.zip', Buffer.from(download.data));
31+
name: docs
32+
github-token: ${{ secrets.GITHUB_TOKEN }}
33+
repository: ${{ context.repo }}
34+
run-id: ${{github.event.workflow_run.id }}
5035

5136
- name: Extract docs
5237
run: unzip docs.zip -d docs && unzip docs/docs.zip -d docs/docs
@@ -97,25 +82,12 @@ jobs:
9782
if: github.event.workflow_run.conclusion == 'success' && startsWith(github.ref, 'refs/tags/')
9883
steps:
9984
- name: Download live doc
100-
uses: actions/[email protected]
85+
- uses: actions/download-artifact@v4
10186
with:
102-
script: |
103-
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
104-
owner: context.repo.owner,
105-
repo: context.repo.repo,
106-
run_id: ${{github.event.workflow_run.id }},
107-
});
108-
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
109-
return artifact.name == "livedoc"
110-
})[0];
111-
var download = await github.rest.actions.downloadArtifact({
112-
owner: context.repo.owner,
113-
repo: context.repo.repo,
114-
artifact_id: matchArtifact.id,
115-
archive_format: 'zip',
116-
});
117-
var fs = require('fs');
118-
fs.writeFileSync('${{github.workspace}}/livedoc.zip', Buffer.from(download.data));
87+
name: livedoc
88+
github-token: ${{ secrets.GITHUB_TOKEN }}
89+
repository: ${{ context.repo }}
90+
run-id: ${{github.event.workflow_run.id }}
11991

12092
- name: Extract live doc
12193
run: unzip livedoc.zip -d doc && unzip doc/livedoc.zip -d doc/doc

0 commit comments

Comments
 (0)