generated from allen-cell-animated/github-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 4
30 lines (25 loc) · 939 Bytes
/
pr-preview.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Adapted from https://github.com/marketplace/actions/deploy-pr-preview.
name: GitHub Pages PR Preview
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
# Must override default webpack build base so that assets can still be accessed when not placed in the root directory of gh-pages branch.
- name: Install and Build
run: npm ci && webpack --config webpack.dev.js --env env=production basename=/website-3d-cell-viewer/pr-preview/pr-${PR_NUMBER}/
env:
PR_NUMBER: ${{ github.event.number }}
- name: Deploy preview
uses: rossjrw/pr-preview-action@430e3dfc1de8a8ae77e77d862d25676ef9db55d1
with:
source-dir: ./imageviewer/