-
Notifications
You must be signed in to change notification settings - Fork 25
44 lines (37 loc) · 1.08 KB
/
test-build-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
name: Test, Build and Deploy Preview Application
on:
pull_request:
types: ['opened', 'edited', 'synchronize']
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
# Sets up the Node environment to build the application on
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
# Installs local dependencies needed to build, test, etc.
- name: Install Dependencies
run: |
npm install
# Runs all tests and builds the application
- name: Run Tests and Build Application
run: |
npm run test:full
env:
CI: true
# Upload CodeCov report to the remote server
- name: Upload Code Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './docs/.vitepress/dist'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}