@@ -11,9 +11,6 @@ permissions:
1111 id-token : write
1212jobs :
1313 build :
14- environment :
15- name : github-pages
16- url : ${{ steps.deployment.outputs.page_url }}
1714 runs-on : ubuntu-latest
1815 steps :
1916 - uses : actions/checkout@v4
3936 # Action to download artifacts from a different workflow (analysis.yml)
4037 - name : ' Download artifact'
4138 if : ${{ github.event.workflow_run.conclusion == 'success' }}
42- uses : actions/ github-script@v6
39+ uses : ./. github/actions/download-artifact
4340 with :
44- script : |
45- let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
46- owner: context.repo.owner,
47- repo: context.repo.repo,
48- run_id: context.payload.workflow_run.id,
49- });
50- let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
51- return artifact.name == "Figures"
52- })[0];
53- let download = await github.rest.actions.downloadArtifact({
54- owner: context.repo.owner,
55- repo: context.repo.repo,
56- artifact_id: matchArtifact.id,
57- archive_format: 'zip',
58- });
59- let fs = require('fs');
60- fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/Figures.zip`, Buffer.from(download.data));
61-
62- - name : ' Unzip artifact'
63- run : unzip Figures.zip
41+ name : ' Figures'
6442
6543 - name : Build html
6644 run : |
7553 with :
7654 path : ' docs/_build/html'
7755
56+ deploy :
57+ needs : build
58+ environment :
59+ name : github-pages
60+ url : ${{ steps.deployment.outputs.page_url }}
61+
62+ runs-on : ubuntu-latest
63+ steps :
7864 - name : Deploy to GitHub Pages
7965 id : deployment
8066 uses : actions/deploy-pages@v4
0 commit comments