Skip to content

Commit

Permalink
Use oss-docs orb to publish docs (#263)
Browse files Browse the repository at this point in the history
* Use oss-docs to publish docs

* Fix repo name

* remove testing values
  • Loading branch information
Andrew Suderman committed Jul 6, 2022
1 parent 7a2e870 commit 6bd8200
Showing 1 changed file with 10 additions and 46 deletions.
56 changes: 10 additions & 46 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: 2.1

orbs:
rok8s: fairwinds/rok8s-scripts@11
oss-docs: fairwinds/oss-docs@0

executors:
golang-exec:
Expand Down Expand Up @@ -67,56 +68,16 @@ jobs:
vault_path: repo/rbac-lookup/env
- run: go mod download && go mod verify
- run: goreleaser
publish_docs:
docker:
- image: cimg/node:15.5.1
steps:
- checkout
- run:
name: Build Docs Site
command: |
set -e
cd ./docs
npm install
npm run check-links
npm run build
- run:
name: Install Tools
command: |
cd /tmp
echo "Installing AWS CLI"
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
echo "Installing Hashicorp Vault"
curl -LO https://releases.hashicorp.com/vault/1.9.3/vault_1.9.3_linux_amd64.zip
unzip vault_1.9.3_linux_amd64.zip
sudo mv vault /usr/bin/vault
sudo chmod +x /usr/bin/vault
vault --version
echo "Installing yq"
curl -LO https://github.com/mikefarah/yq/releases/download/v4.16.2/yq_linux_amd64.tar.gz
tar -zxvf yq_linux_amd64.tar.gz
sudo mv yq_linux_amd64 /usr/bin/yq
sudo chmod +x /usr/bin/yq
yq --version
- rok8s/get_vault_env:
vault_path: repo/rbac-lookup/env
- run:
name: Publish Docs Site to S3
command: |
cd ./dist
aws s3 sync ./ s3://rbac-lookup.docs.fairwinds.com --delete
workflows:
version: 2
test-and-release:
test:
jobs:
- test:
filters:
branches:
only: /.*/
tags:
ignore: /.*/
- snapshot:
requires:
- test
Expand All @@ -141,15 +102,18 @@ workflows:
name: "End-To-End Kubernetes 1.22"
kind_node_image: "kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047"
<<: *e2e_config
release:
jobs:
- release:
filters:
branches:
ignore: /.*/
tags:
only: /.*/
- publish_docs:
- oss-docs/publish-docs:
repository: rbac-lookup
filters:
branches:
only: sudermanjr/docs-site
ignore: /.*/
tags:
only: /.*/
only: /^.*/

0 comments on commit 6bd8200

Please sign in to comment.