Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: publish docs #19

Merged
merged 1 commit into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/docs-main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Dev docs

permissions: {}

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# - name: Setup Go
# uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
# with:
# go-version-file: go.mod
# cache-dependency-path: go.sum
- name: Build site
run: |
set -e
make codegen-mkdocs
- name: Deploy site
run: |
set -e
git fetch origin gh-pages --depth=1
git config user.name ci-bot
git config user.email [email protected]
mike deploy -F ./website/mkdocs.yaml --push --update-aliases main dev
45 changes: 45 additions & 0 deletions .github/workflows/docs-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Release docs

permissions: {}

on:
push:
tags:
- 'docs-v*'

jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Parse semver string
id: semver
uses: booxmedialtd/ws-action-parse-semver@7784200024d6b3fc01253e617ec0168daf603de3 # v1.4.7
with:
input_string: ${{ github.ref_name }}
version_extractor_regex: '^docs-v(.*)$'
- name: Checkout
if: ${{ steps.semver.outputs.prerelease == '' }}
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# - name: Setup Go
# uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
# if: ${{ steps.semver.outputs.prerelease == '' }}
# with:
# go-version-file: go.mod
# cache-dependency-path: go.sum
- name: Build site
if: ${{ steps.semver.outputs.prerelease == '' }}
run: |
set -e
make codegen-mkdocs
- name: Deploy site
if: ${{ steps.semver.outputs.prerelease == '' }}
run: |
set -e
git fetch origin gh-pages --depth=1
git config user.name ci-bot
git config user.email [email protected]
mike deploy -F ./website/mkdocs.yaml --push --update-aliases ${{ steps.semver.outputs.fullversion }} latest
56 changes: 1 addition & 55 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,55 +1 @@
website/site/404.html
website/site/index.html
website/site/sitemap.xml
website/site/sitemap.xml.gz
website/site/assets/images/favicon.png
website/site/assets/javascripts/bundle.c8d2eff1.min.js
website/site/assets/javascripts/bundle.c8d2eff1.min.js.map
website/site/assets/javascripts/lunr/tinyseg.js
website/site/assets/javascripts/lunr/wordcut.js
website/site/assets/javascripts/lunr/min/lunr.ar.min.js
website/site/assets/javascripts/lunr/min/lunr.da.min.js
website/site/assets/javascripts/lunr/min/lunr.de.min.js
website/site/assets/javascripts/lunr/min/lunr.du.min.js
website/site/assets/javascripts/lunr/min/lunr.el.min.js
website/site/assets/javascripts/lunr/min/lunr.es.min.js
website/site/assets/javascripts/lunr/min/lunr.fi.min.js
website/site/assets/javascripts/lunr/min/lunr.fr.min.js
website/site/assets/javascripts/lunr/min/lunr.he.min.js
website/site/assets/javascripts/lunr/min/lunr.hi.min.js
website/site/assets/javascripts/lunr/min/lunr.hu.min.js
website/site/assets/javascripts/lunr/min/lunr.hy.min.js
website/site/assets/javascripts/lunr/min/lunr.it.min.js
website/site/assets/javascripts/lunr/min/lunr.ja.min.js
website/site/assets/javascripts/lunr/min/lunr.jp.min.js
website/site/assets/javascripts/lunr/min/lunr.kn.min.js
website/site/assets/javascripts/lunr/min/lunr.ko.min.js
website/site/assets/javascripts/lunr/min/lunr.multi.min.js
website/site/assets/javascripts/lunr/min/lunr.nl.min.js
website/site/assets/javascripts/lunr/min/lunr.no.min.js
website/site/assets/javascripts/lunr/min/lunr.pt.min.js
website/site/assets/javascripts/lunr/min/lunr.ro.min.js
website/site/assets/javascripts/lunr/min/lunr.ru.min.js
website/site/assets/javascripts/lunr/min/lunr.sa.min.js
website/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js
website/site/assets/javascripts/lunr/min/lunr.sv.min.js
website/site/assets/javascripts/lunr/min/lunr.ta.min.js
website/site/assets/javascripts/lunr/min/lunr.te.min.js
website/site/assets/javascripts/lunr/min/lunr.th.min.js
website/site/assets/javascripts/lunr/min/lunr.tr.min.js
website/site/assets/javascripts/lunr/min/lunr.vi.min.js
website/site/assets/javascripts/lunr/min/lunr.zh.min.js
website/site/assets/javascripts/workers/search.b8dbb3d2.min.js
website/site/assets/javascripts/workers/search.b8dbb3d2.min.js.map
website/site/assets/stylesheets/main.7e359304.min.css
website/site/assets/stylesheets/main.7e359304.min.css.map
website/site/assets/stylesheets/palette.06af60db.min.css
website/site/assets/stylesheets/palette.06af60db.min.css.map
website/site/blog/index.html
website/site/overrides/home.html
website/site/overrides/main.html
website/site/search/search_index.json
website/site/static/extra.css
website/site/static/favicon.ico
website/site/static/kyverno-chainsaw-horizontal.png
website/site/static/kyverno-chainsaw-logo.png
website/site/