-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.53 KB
/
build-and-test-and-deploy.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
name: Build and Test and Deploy
on:
push:
branches:
- KillYourMaster
pull_request:
jobs:
ci-cd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Cache Node dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.cache-name }}-
${{ runner.os }}-node-
${{ runner.os }}-
- name: Cache Build artifacts
uses: actions/cache@v3
with:
path: ./.cache
key: ${{ runner.os }}-node-${{ hashFiles('**/*') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-
- name: Test & build the application
run: |
npm ci
npm run deploy
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './build'
production-branch: KillYourMaster
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-config-path: './netlify.toml'
deploy-message: 'Deploy from herschel666/tweexel-editor'
enable-pull-request-comment: false
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1