-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (86 loc) · 2.59 KB
/
daily.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Daily Build
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
name: Format
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- name: Install dependencies
run: npm install
- name: Check formatting
run: npm run format:check
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- name: Install dependencies
run: npm install
- name: Run linter
run: npm run lint
check:
runs-on: ubuntu-latest
name: Check
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- name: Install dependencies
run: npm install
- name: Run svelte-check
env:
CONTENTFUL_DELIVERY_KEY: ${{ secrets.CONTENTFUL_DELIVERY_KEY }}
CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }}
CONTENTFUL_PREVIEW_KEY: ${{ secrets.CONTENTFUL_PREVIEW_KEY }}
CONTENTFUL_PREVIEW_FLAG: ${{ secrets.CONTENTFUL_PREVIEW_FLAG }}
run: npm run check
build:
runs-on: ubuntu-latest
name: Build
needs: [format, lint, check]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- name: Install dependencies
run: npm install
- name: Build website
env:
CONTENTFUL_DELIVERY_KEY: ${{ secrets.CONTENTFUL_DELIVERY_KEY }}
CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }}
CONTENTFUL_PREVIEW_KEY: ${{ secrets.CONTENTFUL_PREVIEW_KEY }}
CONTENTFUL_PREVIEW_FLAG: ${{ secrets.CONTENTFUL_PREVIEW_FLAG }}
CLIENT_ACKEE_URL: ${{ secrets.CLIENT_ACKEE_URL }}
CLIENT_ACKEE_DOMAIN_ID: ${{ secrets.CLIENT_ACKEE_DOMAIN_ID }}
run: npm run build
- name: Install Netlify
run: npm install -g netlify-cli
- name: Deploy website
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: netlify deploy --dir=build --prod