forked from kagisearch/kagi-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
46 lines (46 loc) · 1.26 KB
/
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
46
steps:
- name: 'node:19'
entrypoint: 'npm'
args: ['install']
- name: 'node:19'
entrypoint: 'npm'
args:
- 'run'
- 'docs:build'
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: 'gsutil'
args:
- '-m'
- 'rsync'
- '-r'
- '-d'
- 'docs/.vitepress/dist/'
- 'gs://kagi-us-east1-docs-vitepress/'
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: 'gcloud'
args:
- 'compute'
- 'url-maps'
- 'invalidate-cdn-cache'
- 'kagi-prod-urlmap-anycast'
- '--path'
- '/*'
- '--host'
- 'help.kagi.com'
- '--project'
- 'kagi-global'
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- '-c'
- |-
apt-get -y update && \
apt-get install jq -y
echo APPLICATION_ID=KX359CJ2OY > .env
echo API_KEY=$$API_KEY >> .env
docker run --env-file=.env -e "CONFIG=$(cat scrape-config.json | jq -r tostring)" algolia/docsearch-scraper@sha256:7bc1cd5aa4783bf24be9ddd6ef22a629b6b43e217b3fa220b6a0acbdeb83b8f8
secretEnv: ['API_KEY']
availableSecrets:
secretManager:
- versionName: projects/$PROJECT_ID/secrets/kagi-docs-write-api-key/versions/latest
env: 'API_KEY'