Use netlify action
This commit is contained in:
parent
caaf6cdac5
commit
39b53471c5
|
@ -4,6 +4,9 @@ on:
|
|||
|
||||
name: bookdown
|
||||
|
||||
env:
|
||||
isExtPR: ${{ github.event.pull_request.head.repo.fork == true }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-16.04
|
||||
|
@ -66,10 +69,18 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
|
||||
- name: Deploy to Netlify
|
||||
# NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID added in the repo's secrets
|
||||
if: contains(env.isExtPR, 'false')
|
||||
id: netlify-deploy
|
||||
uses: nwtgck/actions-netlify@v1.1
|
||||
with:
|
||||
publish-dir: './_book'
|
||||
production-branch: master
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
deploy-message:
|
||||
'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})'
|
||||
enable-pull-request-comment: false
|
||||
enable-commit-comment: false
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
run: |
|
||||
npm install netlify-cli -g
|
||||
netlify deploy --prod --dir _book
|
||||
timeout-minutes: 1
|
||||
|
|
Loading…
Reference in New Issue