-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (42 loc) · 1.31 KB
/
insight-viewer-feature.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
name: 'Deploy insight-viewer on PR preview'
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- .github/workflows/insight-viewer-feature.yml
- libs/insight-viewer/**
- apps/insight-viewer-dev/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: nrwl/nx-set-shas@v2
with:
main-branch-name: 'develop'
- run: npm ci
- run: npx nx workspace-lint
- run: npx nx export insight-viewer-dev
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.CDN_FOR_PREVIEW_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.CDN_FOR_PREVIEW_SECRET_KEY }}
aws-region: us-east-1
- name: Deploy Docs
env:
HOST: insight-viewer--pr-${{ github.event.number }}.f.lunit.io
run: |
aws s3 sync \
./dist/apps/insight-viewer-dev/exported \
s3://lunit-cdn-for-preview-virginia/${HOST} \
--delete
- name: Preview link
uses: NejcZdovc/comment-pr@v2.0.0
with:
file: 'comment.md'
github_token: ${{secrets.GITHUB_TOKEN}}
env:
PR_ID: ${{github.event.number}}