Skip to content

Commit

Permalink
try matchartifact undefined test
Browse files Browse the repository at this point in the history
  • Loading branch information
recrwplay committed Jan 18, 2024
1 parent 13d6e36 commit f00b0cc
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/docs-deploy-surge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ jobs:
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "${{ matrix.required-artifacts }}}"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{ env.WORKSPACE }}/${{ matrix.required-artifacts }}.zip', Buffer.from(download.data));
if (matchArtifact != undefined) {
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{ env.WORKSPACE }}/${{ matrix.required-artifacts }}.zip', Buffer.from(download.data));
}
- run: unzip ${{ matrix.required-artifacts }}.zip

Expand Down

0 comments on commit f00b0cc

Please sign in to comment.