Skip to content

Commit

Permalink
Fix PR doc upload workflow (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
regisss authored Jan 24, 2025
1 parent 834a497 commit a3add1d
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/upload_pr_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,12 @@ jobs:
echo "current_work_dir=$(pwd)" >> $GITHUB_OUTPUT
- name: 'Download artifact'
uses: actions/github-script@v3.1.0
uses: actions/download-artifact@v4
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "doc-build-artifact"
})[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('${{steps.setup-env.outputs.current_work_dir}}/doc-build-artifact.zip', Buffer.from(download.data));
- run: |
mkdir build_dir
unzip doc-build-artifact.zip -d build_dir
name: doc-build-artifact
path: ${{ github.workspace }}/build_dir
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{github.event.workflow_run.id }}

- name: Display structure of downloaded files
run: ls -l
Expand Down

0 comments on commit a3add1d

Please sign in to comment.