Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
atteggiani committed Nov 1, 2023
1 parent e8c323c commit 8a30c21
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 103 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/build_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,30 @@ jobs:
uses: actions/[email protected]
with:
script: |
console.log('run_id=',${{ github.event.workflow_run.id }});
debug: true
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.run_id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr_site"
})[0];
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}}/pr_site.zip', Buffer.from(download.data));
- run: unzip pr_site.zip

- name: Deploy preview
uses: access-nri/[email protected]
with:
source-dir: site
action: deploy
pr-number: ${{ github.event.number }}

close-preview:
if: ${{ github.event.action == 'closed' }}
Expand Down
101 changes: 0 additions & 101 deletions .github/workflows/build_preview_orig.yml

This file was deleted.

0 comments on commit 8a30c21

Please sign in to comment.