Skip to content

Commit

Permalink
ENH: Add Netlify configuration
Browse files Browse the repository at this point in the history
Deploy previews and publish on master for https://itkexamples.netlify.app

Closes #159
  • Loading branch information
thewtex committed Feb 26, 2021
1 parent afb0bab commit 08270ba
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,26 @@ jobs:
path: |
${{ github.workspace }}/ITKExamples-build/ITKExamples-5.2.0-html.tar.gz
${{ github.workspace }}/ITKExamples-build/ITKExamples-5.2.0-html.zip
- name: Unpack site
shell: bash
run: |
mkdir site
tar --strip-components=1 -xf ${{ github.workspace }}/ITKExamples-build/ITKExamples-*-html.tar.gz -C site
- name: Publish website preview
uses: netlify/actions/cli@master
with:
args: deploy --dir=site
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

- name: Publish website
if: github.ref == 'refs/heads/master'
uses: netlify/actions/cli@master
with:
args: deploy --prod --dir=site
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

0 comments on commit 08270ba

Please sign in to comment.