Repository navigation
74 lines (66 loc) · 1.84 KB
/
Copy pathdocs.yml
File metadata and controls
74 lines (66 loc) · 1.84 KB
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
name: Deploy Docs
on:
push:
branches: [main]
paths:
- docs/**
- blog/**
- assets/**
- mkdocs.yml
- CACTUS_VERSION
- CONTRIBUTING.md
- DCO.md
- .github/assemble-docs.sh
- .github/docs-overrides/**
- .github/workflows/docs.yml
- python/README.md
- apple/README.md
- android/README.md
- bindings/flutter/README.md
- bindings/kotlin/README.md
- bindings/react-native/README.md
- bindings/rust/README.md
- bindings/swift/README.md
- README.md
workflow_call:
inputs:
version:
type: string
required: false
workflow_dispatch:
permissions:
contents: read
concurrency:
group: docs-deploy
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: pip install "mkdocs==1.6.1" "mkdocs-material==9.7.5" "mike==2.1.4"
- name: Build and deploy docs
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
TAG="${{ inputs.version || '' }}"
[ -z "$TAG" ] && TAG=$(cat CACTUS_VERSION | tr -d '[:space:]')
bash .github/assemble-docs.sh "$TAG"
mike deploy "$TAG" latest --update-aliases --push
mike set-default latest --push
git checkout gh-pages
echo "docs.cactuscompute.com" > CNAME
git add CNAME
git commit -m "Preserve CNAME for custom domain" --allow-empty || true
git push origin gh-pages
git checkout -