-
Notifications
You must be signed in to change notification settings - Fork 5
/
cloudbuild.yaml
45 lines (40 loc) · 916 Bytes
/
cloudbuild.yaml
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
steps:
- id: build-image
name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '-t', 'eu.gcr.io/$PROJECT_ID/build:$BUILD_ID', '.' ]
- id: build
waitFor:
- build-image
name: 'eu.gcr.io/$PROJECT_ID/build:$BUILD_ID'
entrypoint: "/bin/bash"
args:
- -c
- |
mkdir -p website/content/en/docs
kubernetes-api-reference hugo --file api/v1.19/swagger.json --config-dir config/v1.19 --output-dir website/content/en/docs
- id: hugo
waitFor:
- build
name: 'klakegg/hugo'
entrypoint: "/bin/sh"
args:
- -c
- |
cd website
hugo --environment ${_HOSTING}
tar zcf public.tgz public
- id: deploy
waitFor: ['hugo']
name: 'eu.gcr.io/$PROJECT_ID/firebase'
args:
- 'deploy'
- '-P'
- '$PROJECT_ID'
- '--only'
- 'hosting:${_HOSTING}'
dir: website
artifacts:
objects:
location: 'gs://$PROJECT_ID/${BRANCH_NAME}${TAG_NAME}/'
paths:
- "website/public.tgz"