-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (51 loc) · 1.38 KB
/
netlify.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
# .github/workflows/netlify.yml
name: Build and Deploy to Netlify
on:
push:
branches:
- main
jobs:
build-artifacts:
name: "Build Artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: npm install and build the Triplo website
run: |
npm install --legacy-peer-deps
npm run build --production
- uses: actions/upload-artifact@v3
with:
name: Triplo
path: './dist/apps/triplo'
run-tests:
name: "Run Tests"
runs-on: ubuntu-latest
needs: build-artifacts
steps:
- uses: actions/checkout@v3
- name: npm install and run test
run: |
npm install --legacy-peer-deps
npm run test
deploy-to-netlify:
name: "Deploy to Netlify"
runs-on: ubuntu-latest
needs: run-tests
steps:
- uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: Triplo
path: './dist/apps/triplo'
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './dist/apps/triplo'
production-branch: main
enable-commit-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1