chore(deps): update nwtgck/actions-netlify action to v3 (#209) #99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
paths: ["/book"] | |
name: Publish mdBook | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install mdBook | |
uses: actions-rs/[email protected] | |
with: | |
crate: mdbook | |
version: latest | |
use-tool-cache: true | |
- name: Build mdBook | |
run: mdbook build book | |
- name: Publish to Netlify (Stable) | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: nwtgck/actions-netlify@v3 | |
with: | |
publish-dir: book/book | |
production-branch: main | |
production-deploy: true | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
- name: Publish to Netlify (Preview) | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: nwtgck/actions-netlify@v3 | |
with: | |
publish-dir: book/book | |
alias: ${{ github.head_ref }} | |
production-branch: main | |
production-deploy: false | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |