Skip to content

Commit 2498063

Browse files
Fix CI: upload-artifacts + HappyX (#250)
1 parent 70ca062 commit 2498063

File tree

4 files changed

+42
-30
lines changed

4 files changed

+42
-30
lines changed

Diff for: .github/workflows/netlify_build_docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: build docs
2020
run: nimble docs
2121
- run: echo Commit hash = ${{ github.event.pull_request.head.sha }}
22-
- uses: actions/upload-artifact@v2
22+
- uses: actions/upload-artifact@v4
2323
with:
2424
name: build-${{ github.event.pull_request.head.sha }}
2525
path: docs/

Diff for: .github/workflows/netlify_deploy_preview.yml

+38-26
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,45 @@ jobs:
3131
sha: ${{ steps.source-run-info.outputs.sourceHeadSha }}
3232
description: Deploying site to Netlify. Please wait...
3333
state: pending
34-
- name: 'Download artifact'
35-
uses: actions/[email protected]
36-
with:
37-
script: |
38-
var artifacts = await github.actions.listWorkflowRunArtifacts({
39-
owner: context.repo.owner,
40-
repo: context.repo.repo,
41-
run_id: ${{github.event.workflow_run.id }},
42-
});
43-
console.log("Target artifact: " + "build-${{ steps.source-run-info.outputs.sourceHeadSha }}")
44-
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
45-
console.log("Found artifacts: " + artifact.name)
46-
return artifact.name == "build-${{ steps.source-run-info.outputs.sourceHeadSha }}"
47-
})[0];
48-
if (matchArtifact == undefined) {
49-
core.setFailed('Artifact not found!');
50-
}
51-
var download = await github.actions.downloadArtifact({
52-
owner: context.repo.owner,
53-
repo: context.repo.repo,
54-
artifact_id: matchArtifact.id,
55-
archive_format: 'zip',
56-
});
57-
var fs = require('fs');
58-
fs.writeFileSync('${{github.workspace}}/docs.zip', Buffer.from(download.data));
5934
- run: rm -rf docs
60-
- run: unzip -d docs/ docs.zip
35+
# - name: 'Download artifacts'
36+
# uses: actions/download-artifact@v4
37+
# with:
38+
# name: "build-${{ steps.source-run-info.outputs.sourceHeadSha }}"
39+
# path: docs/
40+
- name: 'Download artifacts'
41+
uses: dawidd6/action-download-artifact@v2
42+
with:
43+
github_token: ${{secrets.GITHUB_TOKEN}}
44+
workflow: netlify_build_docs.yml # Name of the workflow that created the artifact
45+
name: "build-${{ steps.source-run-info.outputs.sourceHeadSha }}" # Name of the artifact
46+
path: docs/ # Optional path to extract to
47+
# - name: 'Download artifact'
48+
# uses: actions/[email protected]
49+
# with:
50+
# script: |
51+
# var artifacts = await github.actions.listWorkflowRunArtifacts({
52+
# owner: context.repo.owner,
53+
# repo: context.repo.repo,
54+
# run_id: ${{github.event.workflow_run.id }},
55+
# });
56+
# console.log("Target artifact: " + "build-${{ steps.source-run-info.outputs.sourceHeadSha }}")
57+
# var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
58+
# console.log("Found artifacts: " + artifact.name)
59+
# return artifact.name == "build-${{ steps.source-run-info.outputs.sourceHeadSha }}"
60+
# })[0];
61+
# if (matchArtifact == undefined) {
62+
# core.setFailed('Artifact not found!');
63+
# }
64+
# var download = await github.actions.downloadArtifact({
65+
# owner: context.repo.owner,
66+
# repo: context.repo.repo,
67+
# artifact_id: matchArtifact.id,
68+
# archive_format: 'zip',
69+
# });
70+
# var fs = require('fs');
71+
# fs.writeFileSync('${{github.workspace}}/docs.zip', Buffer.from(download.data));
72+
#- run: unzip -d docs/ docs.zip
6173
- run: echo Deploy Alias = ${{ env.GITHUB_SHA_SHORT }}
6274
- uses: jsmrcaga/action-netlify-deploy@master
6375
with:

Diff for: docsrc/interactivity.nim

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ nimibCode:
286286
{message}
287287
tButton:
288288
"Click me!"
289-
@click(
290-
message.set("Poof! Gone!"))
289+
@click:
290+
message.set("Poof! Gone!")
291291

292292
nbText: "This is the output this code produces when called:"
293293

Diff for: nimib.nimble

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ requires "parsetoml >= 0.7.0"
1616
requires "jsony >= 1.1.5"
1717

1818
task docsdeps, "install dependendencies required for doc building":
19-
exec "nimble -y install [email protected] [email protected] nimoji nimpy karax@1.2.2 [email protected]"
19+
exec "nimble -y install [email protected] [email protected] nimoji nimpy karax@1.3.3 [email protected]"
2020

2121
task test, "General tests":
2222
for file in ["tsources.nim", "tblocks.nim", "tnimib.nim", "trenders.nim"]:

0 commit comments

Comments
 (0)