-
Notifications
You must be signed in to change notification settings - Fork 72
42 lines (40 loc) · 1.2 KB
/
publish-docs-staging.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
name: Publish docs-staging.k8ssandra.io
on:
push:
branches:
- main
jobs:
build_and_publish:
name: Build and publish docs-staging.k8ssandra.io
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v4
name: Checkout code w/ submodules
with:
submodules: recursive
- uses: google-github-actions/setup-gcloud@v0.6.0
name: Setup gcloud
with:
project_id: ${{ secrets.GCP_DOCS_STAGING_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_DOCS_STAGING_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:staging
- run: npm run deploy:staging
- 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}'