This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
batect.yml
145 lines (127 loc) · 3.48 KB
/
batect.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
project_name: batect.dev
containers:
linkcheck:
build_directory: .batect/linkcheck
volumes:
- local: ./linkcheck-ignore.txt
container: /linkcheck-ignore.txt
options: ro
docs-server:
build_directory: .batect/docs-server
volumes:
- local: ./build-linkcheck
container: /usr/share/nginx/html
options: ro
redirect-check:
build_directory: .batect/redirect-check
volumes:
- local: .
container: /code
options: ro
docsearch-scraper:
build_directory: .batect/docsearch-scraper
volumes:
- local: tools/algolia
container: /config
options: ro
environment:
APPLICATION_ID: 7ZUQMR16DB
API_KEY: $API_KEY
tasks:
setup:
description: Install dependencies.
group: Setup tasks
run:
container: node-build-env
command: yarn install --frozen-lockfile
shell:
description: Start a shell in the build environment.
group: Utility tasks
run:
container: node-build-env
command: bash
build:
description: Build the site.
group: Build tasks
run:
container: node-build-env
command: yarn build
build-linkcheck:
description: Build a production-like version of the site suitable for checking links.
group: Build tasks
run:
container: node-build-env
command: yarn build --out-dir build-linkcheck
environment:
SITE_URL: http://docs-server
check-format:
description: Check for formatting issues.
group: Linting and formatting tasks
run:
container: node-build-env
command: yarn checkFormat
fix-format:
description: Fix formatting issues.
group: Linting and formatting tasks
run:
container: node-build-env
command: yarn fixFormat
lint:
description: Check for linting issues.
group: Linting and formatting tasks
run:
container: node-build-env
command: yarn lint
fix-lint:
description: Fix linting issues.
group: Linting and formatting tasks
run:
container: node-build-env
command: yarn lintFix
start:
description: Start the site locally.
group: Testing tasks
run:
container: node-build-env
command: yarn start --host 0.0.0.0
ports:
- local: 3000
container: 3000
check-links:
description: Check the site for broken links.
group: Testing tasks
prerequisites:
- build-linkcheck
dependencies:
- docs-server
run:
container: linkcheck
command: linkcheck --external http://docs-server --skip-file /linkcheck-ignore.txt --no-show-redirects --connection-failures-as-warnings
deploy:
description: Deploy the site.
group: Deployment tasks
run:
container: node-build-env
command: sh -c './node_modules/.bin/netlify deploy --prod --message "$DEPLOY_DESCRIPTION"'
environment:
NETLIFY_AUTH_TOKEN: $NETLIFY_AUTH_TOKEN
DEPLOY_DESCRIPTION: $DEPLOY_DESCRIPTION
check-redirects:
description: Check the site for broken redirects.
group: Testing tasks
prerequisites:
- build-linkcheck
dependencies:
- docs-server
run:
container: redirect-check
command: /scripts/redirect-check.py http://docs-server /code/netlify.toml
update-search-index:
description: Update the Algolia search index.
group: Deployment tasks
run:
container: docsearch-scraper
include:
- type: git
repo: https://github.com/batect/node-bundle.git
ref: 0.73.0