This repository has been archived by the owner on Sep 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
84 lines (80 loc) · 2.73 KB
/
ci-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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI - CD
on:
push:
branches: [main]
pull_request:
branches:
- '**'
jobs:
first_interaction:
if: github.event_name == 'pull_request'
name: 'first interaction'
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: |
Thanks for your first pull request on this project!
This is a kindly reminder to read the following resources:
- [code of conduct]()
- [contribution guidelines]()
It'll help us to review your contribution and to ensure it's aligned with our standards.
greetings:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: kerhub/[email protected]
with:
token: "${{ secrets.GITHUB_TOKEN }}"
reply: |
Hi @${{ github.event.pull_request.user.login }}, thanks for being part of the community :heart:
We'll review your contribution as soon as possible!
prettier:
uses: kerhub/reusable-workflows/.github/workflows/node-job.yml@main
with:
command: npm run prettier --check \"**\"
linter:
uses: kerhub/reusable-workflows/.github/workflows/node-job.yml@main
with:
command: npx eslint --fix src/**/*.ts
unit_tests:
name: 'unit tests'
uses: kerhub/reusable-workflows/.github/workflows/node-job.yml@main
with:
command: npm run test
deploy_preview:
name: 'deploy preview'
if: github.event_name == 'pull_request'
needs: [prettier, linter, unit_tests]
uses: kerhub/reusable-workflows/.github/workflows/netlify-preview-deploy.yml@main
with:
build_directory: './output/dist'
secrets:
netlifyAuthToken: "${{ secrets.NETLIFY_AUTH_TOKEN }}"
netlifySiteId: "${{ secrets.NETLIFY_SITE_ID }}"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
deploy_live:
name: 'deploy live'
if: github.event_name == 'push'
needs: [prettier, linter, unit_tests]
uses: kerhub/reusable-workflows/.github/workflows/netlify-live-deploy.yml@main
with:
build_directory: './output/dist'
secrets:
netlifyAuthToken: "${{ secrets.NETLIFY_AUTH_TOKEN }}"
netlifySiteId: "${{ secrets.NETLIFY_SITE_ID }}"
lighthouse_preview:
name: 'lighthouse preview'
needs: deploy_preview
uses: kerhub/reusable-workflows/.github/workflows/lighthouse-preview.yml@main
with:
siteName: 'dojo-realworld'
secrets:
netlifyAuthToken: "${{ secrets.NETLIFY_AUTH_TOKEN }}"
lighthouse_live:
name: 'lighthouse live'
needs: deploy_live
uses: kerhub/reusable-workflows/.github/workflows/lighthouse-live.yml@main
with:
siteUrl: 'https://dojo-realworld.netlify.app/'