Skip to content

Add project design content #113

Add project design content

Add project design content #113

name: NetlifyPreview
on:
pull_request_target:
types: [labeled, synchronize]
paths:
- 'docs/**'
- 'environment.yml'
branches:
- main
jobs:
add-preview:
runs-on: ubuntu-latest
# This workflow accesses secrets and checks out a PR, so only run if labelled
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
if: contains(github.event.pull_request.labels.*.name, 'preview')
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/actions/setupconda
- name: Build book
run: |
jupyter-book build docs/
- name: Deploy Website Preview
uses: nwtgck/[email protected]
with:
publish-dir: './docs/_build/html'
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-commit-comment: false
enable-pull-request-comment: true
overwrites-pull-request-comment: true
alias: deploy-preview-${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1