generated from allen-cell-animated/github-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (41 loc) · 1.5 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Adapted from https://github.com/marketplace/actions/deploy-pr-preview.
name: Deploy PR Preview
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: ubuntu-latest
needs: [deploy-preview-internal]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
# Must override default vite 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 && npx vite build --base=/timelapse-colorizer/pr-preview/pr-${PR_NUMBER}/
env:
PR_NUMBER: ${{ github.event.number }}
- name: Deploy preview
uses: rossjrw/pr-preview-action@430e3dfc1de8a8ae77e77d862d25676ef9db55d1
with:
source-dir: ./dist/
deploy-preview-internal:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install and Build
run: npm ci && npx vite build --base=/timelapse-colorizer/pr-preview-internal/pr-${PR_NUMBER}/ --config config/vite.internal-build.config.js
env:
PR_NUMBER: ${{ github.event.number }}
- name: Deploy internal preview
uses: rossjrw/pr-preview-action@430e3dfc1de8a8ae77e77d862d25676ef9db55d1
with:
source-dir: ./dist/
umbrella-dir: pr-preview-internal