-
Notifications
You must be signed in to change notification settings - Fork 79
44 lines (42 loc) · 1.23 KB
/
publish-docs.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
name: Publish docs.k8ssandra.io
on:
push:
tags:
- 'docs-v*.*.*'
- 'docs-v*.*.*-*'
- 'v*.*.0'
jobs:
build_and_publish:
name: Build and publish docs.k8ssandra.io
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v3
name: Checkout code w/ submodules
with:
submodules: recursive
- uses: google-github-actions/[email protected]
name: Setup gcloud
with:
project_id: ${{ secrets.GCP_DOCS_PROD_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_DOCS_PROD_SA_KEY }}
export_default_credentials: true
- uses: actions/setup-node@v3
name: Setup Node
with:
node-version: 20.x
- run: npm install
- run: npm run clean
- run: npm run build:production
- run: npm run deploy:production
- name: Purge CDN Cache
env:
ZONE_ID: ${{ secrets.CF_ZONE_ID }}
BEARER_TOKEN: ${{ secrets.CF_BEARER_TOKEN }}
run: |
curl -X POST "https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/purge_cache" \
-H "Authorization: Bearer ${BEARER_TOKEN}" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'