Skip to content

Commit be6d8df

Browse files
authored
docs: automatically publish Cluster API Book when release is published (#2)
1 parent 566c4c6 commit be6d8df

17 files changed

+432
-62
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Cluster API Provider Book
2+
on:
3+
# Rebuild docs when a release is published
4+
release:
5+
types: [published]
6+
# Enable manual trigger
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-publish-book:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- name: Install mdbook
17+
run: |
18+
mkdir mdbook
19+
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.15/mdbook-v0.4.15-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
20+
echo `pwd`/mdbook >> $GITHUB_PATH
21+
cargo install mdbook-admonish
22+
- name: Deploy Book to GitHub Pages
23+
run: |
24+
# Build the HTML content
25+
mdbook build -d book/ docs/
26+
27+
# Create and switch to the gh-pages work tree
28+
git worktree add gh-pages gh-pages
29+
cd $GITHUB_WORKSPACE/gh-pages
30+
31+
git config user.name "GitHub Actions"
32+
git config user.email "oci-dax-tools_ww@oracle.com"
33+
34+
# Delete the ref to avoid keeping history.
35+
git update-ref -d refs/heads/gh-pages
36+
rm -rf *
37+
38+
mv $GITHUB_WORKSPACE/docs/book/* $GITHUB_WORKSPACE/gh-pages
39+
touch $GITHUB_WORKSPACE/gh-pages/.nojekyll
40+
41+
git add .
42+
git commit -m "Deploy $GITHUB_SHA to gh-pages"
43+
git push --force-with-lease

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Binaries for programs and plugins
32
*.exe
43
*.exe~
@@ -16,9 +15,11 @@ testbin/
1615
out/
1716

1817
# Kubernetes Generated files - skip generated files, except for vendored files
19-
2018
!vendor/**/zz_generated.*
2119

20+
# Ignore the gh-pages repo in the main branch
21+
gh-pages/
22+
2223
# editor and IDE paraphernalia
2324
.idea
2425
*.swp
@@ -41,4 +42,4 @@ test/e2e/data/infrastructure-oci/v1beta1/cluster-template-oracle-linux.yaml
4142
test/e2e/data/infrastructure-oci/v1beta1/cluster-template.yaml
4243
test/e2e/data/infrastructure-oci/v1beta1/cluster-template-custom-networking-seclist.yaml
4344
test/e2e/data/infrastructure-oci/v1beta1/cluster-template-custom-networking-nsg.yaml
44-
test/e2e/data/infrastructure-oci/v1beta1/cluster-template-multiple-node-nsg.yaml
45+
test/e2e/data/infrastructure-oci/v1beta1/cluster-template-multiple-node-nsg.yaml

README.md

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,47 @@
11
# Kubernetes Cluster API Provider OCI
22

3-
[![Go Report Card](https://goreportcard.com/badge/oracle/cluster-api-provider-oci)](https://goreportcard.com/report/oracle/cluster-api-provider-oci)
3+
[![Go Report Card](https://goreportcard.com/badge/github.com/oracle/cluster-api-provider-oci)](https://goreportcard.com/report/github.com/oracle/cluster-api-provider-oci)
44

5+
<!-- markdownlint-disable MD033 -->
56
<img src="https://github.com/kubernetes/kubernetes/raw/master/logo/logo.png" width="100">
67

78
------
89
Kubernetes-native declarative infrastructure for OCI.
910

10-
### What is the Cluster API Provider OCI
11+
## Kubernetes Cluster API Provider for Oracle Cloud Infrastructure
1112

12-
The [Cluster API (CAPOCI)][cluster_api] brings declarative, Kubernetes-style APIs to cluster creation, configuration and management.
13+
The [Cluster API Provier for OCI (CAPOCI)][cluster_api] brings declarative, Kubernetes-style APIs to cluster creation, configuration and management.
1314

14-
The API itself is shared across multiple cloud providers allowing for true OCI
15-
hybrid deployments of Kubernetes.
15+
The Cluster API itself is shared across multiple cloud providers allowing for true hybrid deployments of Kubernetes.
1616

1717
### Features
1818

1919
- Manages the bootstrapping of VCNs, gateways, subnets, network security groups and instances
20-
- Choice of Linux distribution between Oracle Linux 7 and 8.
21-
- Deploys Kubernetes Control plane into private subnets front-ended by a public load balancer.
22-
- Provide secure and sensible defaults.
20+
- Deploy either Oracle Linux or Ubuntu based instances using custom images built with the [Image Builder][image_builder_book] tool
21+
- Deploys Kubernetes Control plane into private subnets front-ended by a public load balancer
22+
- Provide secure and sensible defaults
2323

2424
### Getting Started
2525

26-
- [Prerequisites][prerequisites]: Set up your OCI tenancy before using Cluster API for OCI.
27-
- [Deployment process][deployment]: Choose your deployment path
28-
- [Networking][networking]: Networking guide
29-
- Installation:
30-
- [Install Cluster API for OCI][install_cluster_api]
31-
- [Install Workload Cluster][install_workload_cluster]
26+
You can find detailed documentation as well as a getting started guide in the [Cluster API Provider for OCI Book][capoci_book].
3227

3328
### Support Policy
34-
Cluster API and Kubernetes version compatibility
35-
36-
#### Cluster API Versions
37-
| | v1beta1 (v1.0) |
38-
| ---------------------------- | -------------- |
39-
| OCI Provider v1beta1 (v0.1) ||
40-
41-
#### Supported Kubernetes versions
42-
43-
| | v1.20 | v1.21 |
44-
| ---------------------------- | ----- | ----- |
45-
| OCI Provider v1beta1 (v0.1) |||
4629

4730
**NOTE:** As the versioning for this project is tied to the versioning of Cluster API, future modifications to this
4831
policy may be made to more closely align with other providers in the Cluster API ecosystem.
4932

33+
#### Cluster API Versions
34+
35+
| | v1beta1 (v1.0) |
36+
| ------------------------------ | :--------------: |
37+
| OCI Provider v1beta1 (v0.1.0) ||
38+
39+
#### Supported Kubernetes versions
5040

41+
| | v1.20 | v1.21 |
42+
| ------------------------------ | :-----: | :-----: |
43+
| OCI Provider v1beta1 (v0.1.0) |||
5144

52-
[cluster_api]: https://github.com/kubernetes-sigs/cluster-api-oci
53-
[deployment]: ./gs/overview.md
54-
[install_cluster_api]: ./gs/install_cluster_api.md
55-
[install_workload_cluster]: ./gs/install_workload_cluster.md
56-
[networking]: ./networking/networking.md
57-
[prerequisites]: ./prerequisites.md
45+
[cluster_api]: https://github.com/oracle/cluster-api-provider-oci
46+
[image_builder_book]: https://image-builder.sigs.k8s.io/capi/providers/oci.html
47+
[capoci_book]: https://oracle.github.io/cluster-api-provider-oci/

docs/book.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ multilingual = false
55
src = "src"
66
title = "Kubernetes Cluster API Provider for Oracle Cloud Infrastructure"
77

8+
[preprocessor.admonish]
9+
command = "mdbook-admonish"
10+
811
[output.html]
9-
curly-quotes = true
10-
# git-repository-url = "https://sigs.k8s.io/cluster-api-provider-oci"
12+
curly-quotes = false
13+
git-repository-url = "https://github.com/oracle/cluster-api-provider-oci"
14+
additional-css = ["./src/css/mdbook-admonish.css"]
1115
# no-section-label = true

0 commit comments

Comments
 (0)