Skip to content

Commit 43ea361

Browse files
authored
Merge pull request #497 from jonathansick/add-workflow-dispatch
Add repository-dispatch workflow to deployment
2 parents f9e4b47 + 77f62e5 commit 43ea361

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,21 @@ jobs:
3939
run: |
4040
nbcollection convert --flatten --build-path=. -v --make-index --index-template=templates/index.tpl tutorials --exclude=conesearch # TODO: remove this exclude!
4141
42+
- name: Name artifact
43+
id: nameartifact
44+
run: |
45+
echo "::set-output name=artifactName::rendered-tutorials-${{ github.sha }}"
46+
4247
- uses: actions/upload-artifact@v2
4348
with:
44-
name: rendered-tutorials-${{ github.sha }}
49+
name: ${{ steps.nameartifact.outputs.artifactName }}
4550
path: _build
51+
52+
- name: Dispatch Learn Astropy deployment
53+
uses: peter-evans/repository-dispatch@0e8ca8c8a5ca5e28d25af2c27fc5aa40f16cffca
54+
if: ${{ (github.event_name == 'push') && (github.ref == 'refs/heads/main') }}
55+
with:
56+
token: ${{ secrets.DISPATCH_GITHUB_TOKEN }}
57+
repository: astropy/learn-astropy
58+
event-type: tutorials-build
59+
client-payload: '{"artifactName": "${{ steps.nameartifact.outputs.artifactName }}", "checkrunid": "${{ github.run_id }}", "repo": "${{ github.repository }}"}'

0 commit comments

Comments
 (0)