-
Notifications
You must be signed in to change notification settings - Fork 13
60 lines (60 loc) · 1.9 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
name: Preview (within a pull request)
on:
pull_request:
branches:
- dev
- main
- 'dev-patch'
- 'patch-*'
types: [opened, edited, synchronize, reopened]
jobs:
build:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
check-latest: true
- name: Check Node version
run: node -v
- name: Update NPM version
run: npm install -g "npm@^7.6.3"
- name: Install
run: npm ci
- name: Test
run: npm test
- name: Coverage
uses: codecov/codecov-action@v1
- name: Build Docs
run: npm run build:docs
- name: Build Storybook
run: npm run build:storybook
- name: Deploy Doc Preview to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './website/react-magma-docs/public'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-pull-request-comment: true
enable-commit-comment: true
overwrites-pull-request-comment: false
alias: docs-preview-${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Deploy Storybook to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './storybook-static'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-pull-request-comment: true
enable-commit-comment: true
overwrites-pull-request-comment: false
alias: storybook-preview-${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}