diff --git a/.github/workflows/netlify_build_docs.yml b/.github/workflows/netlify_build_docs.yml index 72dbb979..63be024c 100644 --- a/.github/workflows/netlify_build_docs.yml +++ b/.github/workflows/netlify_build_docs.yml @@ -19,7 +19,7 @@ jobs: - name: build docs run: nimble docs - run: echo Commit hash = ${{ github.event.pull_request.head.sha }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: build-${{ github.event.pull_request.head.sha }} path: docs/ diff --git a/.github/workflows/netlify_deploy_preview.yml b/.github/workflows/netlify_deploy_preview.yml index 808f2c63..26d2bd8c 100644 --- a/.github/workflows/netlify_deploy_preview.yml +++ b/.github/workflows/netlify_deploy_preview.yml @@ -31,33 +31,45 @@ jobs: sha: ${{ steps.source-run-info.outputs.sourceHeadSha }} description: Deploying site to Netlify. Please wait... state: pending - - name: 'Download artifact' - uses: actions/github-script@v3.1.0 - with: - script: | - var artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - console.log("Target artifact: " + "build-${{ steps.source-run-info.outputs.sourceHeadSha }}") - var matchArtifact = artifacts.data.artifacts.filter((artifact) => { - console.log("Found artifacts: " + artifact.name) - return artifact.name == "build-${{ steps.source-run-info.outputs.sourceHeadSha }}" - })[0]; - if (matchArtifact == undefined) { - core.setFailed('Artifact not found!'); - } - var download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/docs.zip', Buffer.from(download.data)); - run: rm -rf docs - - run: unzip -d docs/ docs.zip + # - name: 'Download artifacts' + # uses: actions/download-artifact@v4 + # with: + # name: "build-${{ steps.source-run-info.outputs.sourceHeadSha }}" + # path: docs/ + - name: 'Download artifacts' + uses: dawidd6/action-download-artifact@v2 + with: + github_token: ${{secrets.GITHUB_TOKEN}} + workflow: netlify_build_docs.yml # Name of the workflow that created the artifact + name: "build-${{ steps.source-run-info.outputs.sourceHeadSha }}" # Name of the artifact + path: docs/ # Optional path to extract to + # - name: 'Download artifact' + # uses: actions/github-script@v3.1.0 + # with: + # script: | + # var artifacts = await github.actions.listWorkflowRunArtifacts({ + # owner: context.repo.owner, + # repo: context.repo.repo, + # run_id: ${{github.event.workflow_run.id }}, + # }); + # console.log("Target artifact: " + "build-${{ steps.source-run-info.outputs.sourceHeadSha }}") + # var matchArtifact = artifacts.data.artifacts.filter((artifact) => { + # console.log("Found artifacts: " + artifact.name) + # return artifact.name == "build-${{ steps.source-run-info.outputs.sourceHeadSha }}" + # })[0]; + # if (matchArtifact == undefined) { + # core.setFailed('Artifact not found!'); + # } + # var download = await github.actions.downloadArtifact({ + # owner: context.repo.owner, + # repo: context.repo.repo, + # artifact_id: matchArtifact.id, + # archive_format: 'zip', + # }); + # var fs = require('fs'); + # fs.writeFileSync('${{github.workspace}}/docs.zip', Buffer.from(download.data)); + #- run: unzip -d docs/ docs.zip - run: echo Deploy Alias = ${{ env.GITHUB_SHA_SHORT }} - uses: jsmrcaga/action-netlify-deploy@master with: diff --git a/docsrc/interactivity.nim b/docsrc/interactivity.nim index 77bc5265..026422fa 100644 --- a/docsrc/interactivity.nim +++ b/docsrc/interactivity.nim @@ -286,8 +286,8 @@ nimibCode: {message} tButton: "Click me!" - @click( - message.set("Poof! Gone!")) + @click: + message.set("Poof! Gone!") nbText: "This is the output this code produces when called:" diff --git a/nimib.nimble b/nimib.nimble index 8722ebf1..850b6a32 100644 --- a/nimib.nimble +++ b/nimib.nimble @@ -16,7 +16,7 @@ requires "parsetoml >= 0.7.0" requires "jsony >= 1.1.5" task docsdeps, "install dependendencies required for doc building": - exec "nimble -y install ggplotnim@0.5.9 numericalnim@0.8.8 nimoji nimpy karax@1.2.2 happyx@2.0.0" + exec "nimble -y install ggplotnim@0.5.9 numericalnim@0.8.8 nimoji nimpy karax@1.3.3 happyx@2.0.0" task test, "General tests": for file in ["tsources.nim", "tblocks.nim", "tnimib.nim", "trenders.nim"]: