-
Notifications
You must be signed in to change notification settings - Fork 64
37 lines (33 loc) · 952 Bytes
/
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
# .github/workflows/preview.yml
name: Deploy PR previews
concurrency:
group: preview-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
jobs:
deploy-preview:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: Cached LFS checkout
uses: nschloe/action-cached-lfs-checkout@f46300cd8952454b9f0a21a3d133d4bd5684cfc2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 18.x
cache: npm
- name: Install and Build
run: |
npm clean-install
npm run build
env:
BASE_URL: /pr-preview/pr-${{ github.event.number }}
- name: Deploy preview
uses: rossjrw/pr-preview-action@430e3dfc1de8a8ae77e77d862d25676ef9db55d1
with:
source-dir: ./build/