-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (43 loc) · 1.11 KB
/
pr.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
name: PR
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
branches:
- main
workflow_dispatch:
concurrency: preview-${{ github.ref }}
permissions:
contents: write
pull-requests: write
jobs:
build-and-deploy:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: ./patterns
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- uses: actions/setup-node@v4
if: github.event.action != 'closed'
with:
node-version: 20
cache: npm
cache-dependency-path: patterns/package-lock.json
- name: Install dependencies
if: github.event.action != 'closed'
run: npm ci --ignore-scripts
- name: Install Dependencies and Build For PR🔧
if: github.event.action != 'closed'
env:
BASE_URL: /nr-architecture-patterns-library/pr-preview/pr-${{github.event.number}}
run: |
npm run build
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./patterns/build