-
Notifications
You must be signed in to change notification settings - Fork 180
63 lines (57 loc) · 1.73 KB
/
cd.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
61
62
63
name: Continuous Deployment
on:
workflow_run:
workflows: ["Continuous Integration"]
branches: [master]
types: [completed]
jobs:
netlify-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- workdir: "./examples/material-demo"
siteId: MATERIAL_DEMO_SITE_ID
projectName: Material Demo
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'yarn'
- run: yarn install
- run: yarn build
working-directory: ${{ matrix.workdir }}
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
deploy-message: Automated CD deploy
publish-dir: ${{ matrix.workdir }}/public
github-token: ${{ secrets.GITHUB_TOKEN }}
github-deployment-environment: ${{ matrix.projectName }} Netlify Deploy
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets[matrix.siteId] }}
timeout-minutes: 1
upload-material-coverage:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- workdir: "./themes/material"
projectName: Material
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'yarn'
- run: yarn install
- run: yarn test
working-directory: ${{ matrix.workdir }}
- name: Upload coverage report to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-path: themes/material
path-to-lcov: themes/material/coverage/lcov.info