Skip to content

Commit 9c0d8e2

Browse files
committed
ENH: Add Netlify configuration
Deploy previews and publish on master for https://itkexamples.netlify.app Closes #159
1 parent 90202e3 commit 9c0d8e2

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

.github/workflows/build-test.yml renamed to .github/workflows/build-test-publish.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build, test
1+
name: Build, test, publish
22

33
on: [push,pull_request]
44

@@ -287,7 +287,7 @@ jobs:
287287
python -m pip install itk==5.2rc02
288288
python -m pip install matplotlib
289289
python -m pip install itkwidgets
290-
290+
291291
- name: Test notebooks
292292
uses: treebeardtech/nbmake-action@v0.2.1
293293

@@ -403,3 +403,24 @@ jobs:
403403
path: |
404404
${{ github.workspace }}/ITKExamples-build/ITKExamples-*-html.tar.gz
405405
${{ github.workspace }}/ITKExamples-build/ITKExamples-*-html.zip
406+
407+
- name: Unpack site
408+
shell: bash
409+
run: |
410+
mkdir site
411+
tar --strip-components=1 -xf ${{ github.workspace }}/ITKExamples-build/ITKExamples-*-html.tar.gz -C site
412+
413+
- name: Publish website to Netlify
414+
uses: nwtgck/actions-netlify@v1.1
415+
with:
416+
publish-dir: './site'
417+
production-branch: master
418+
github-token: ${{ secrets.GITHUB_TOKEN }}
419+
deploy-message: ${{ github.event.pull_request.title }})
420+
enable-pull-request-comment: true
421+
enable-commit-comment: true
422+
overwrites-pull-request-comment: true
423+
env:
424+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
425+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
426+
timeout-minutes: 5

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ITK Examples
22
============
33

4-
.. image:: https://github.com/InsightSoftwareConsortium/ITKExamples/workflows/Build,%20test/badge.svg?branch=master
5-
:target: https://github.com/InsightSoftwareConsortium/ITKExamples/actions?query=workflow%3A%22Build%2C+test%22+branch%3Amaster
4+
.. image:: https://github.com/InsightSoftwareConsortium/ITKExamples/workflows/Build,%20test,%20publish/badge.svg?branch=master
5+
:target: https://github.com/InsightSoftwareConsortium/ITKExamples/actions?query=workflow%3A%22Build%2C+test%2C+publish%22+branch%3Amaster
66

77
.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=shield
88
:target: https://github.com/InsightSoftwareConsortium/ITKExamples/blob/master/LICENSE

0 commit comments

Comments
 (0)