Skip to content

Commit

Permalink
Try to use the gh CLI to inspect the artifacts from the correct workf…
Browse files Browse the repository at this point in the history
…low_run instance
  • Loading branch information
ogrisel committed Oct 30, 2023
1 parent 11e2092 commit 2aff7af
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/jupyter-book-pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,18 @@ jobs:
sha: ${{ github.event.workflow_run.head_sha }}
context: 'JupyterBook preview'

- name: Download artifacts
run: gh run download --name jupyter-book ${{ github.event.workflow_run.id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get pull request number
id: pull-request-number
run: |
export PULL_REQUEST_NUMBER=${{github.event.workflow_run.pull_requests[0].number}}
export PULL_REQUEST_NUMBER=`cat pull_request_number`
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER"
echo "result=${PULL_REQUEST_NUMBER}" >> $GITHUB_OUTPUT
- uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: deploy-gh-pages.yml
pr: ${{steps.pull-request-number.outputs.result}}
name: jupyter-book

- uses: actions/setup-node@v3
with:
node-version: '16'
Expand Down

0 comments on commit 2aff7af

Please sign in to comment.