docs: Add initial docs

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-08-07 16:32:24 +02:00
parent 155946fb1e
commit 567577762f
No known key found for this signature in database
GPG key ID: BC5E2BD907F9A8EC
15 changed files with 819 additions and 11 deletions

View file

@ -24,7 +24,7 @@ jobs:
name: Release charts
runs-on: ubuntu-22.04
steps:
- name: Get k8s-at-home token
- name: Get GitHub API token
id: get-app-token
uses: getsentry/action-github-app-token@v1
with:

65
.github/workflows/docs-release.yaml vendored Normal file
View file

@ -0,0 +1,65 @@
name: "Docs: Release to GitHub pages"
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.ci/mkdocs/mkdocs.yaml'
- '.github/workflows/docs-release.yaml'
- "docs/**"
jobs:
release-docs:
name: Release documentation
runs-on: ubuntu-22.04
steps:
- name: Get GitHub API token
id: get-app-token
uses: getsentry/action-github-app-token@v1
with:
app_id: ${{ secrets.BJWS_APP_ID }}
private_key: ${{ secrets.BJWS_APP_PRIVATE_KEY }}
- name: Checkout charts branch
uses: actions/checkout@v3
with:
token: ${{ steps.get-app-token.outputs.token }}
path: "src"
fetch-depth: 0
- name: Checkout gh-pages branch
uses: actions/checkout@v3
with:
token: ${{ steps.get-app-token.outputs.token }}
path: "dest"
ref: "gh-pages"
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install mkdocs
shell: bash
working-directory: src
run: |
pip install -r ./.ci/mkdocs/requirements.txt
- name: Build documentation
shell: bash
working-directory: src
run: |
mkdocs build --config-file ./.ci/mkdocs/mkdocs.yaml -d "$PWD/../dest/docs"
- name: Commit changes
shell: bash
working-directory: dest
run: |
git config user.name "bjw-s-bot[bot]"
git config user.email "bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>"
git add docs
git commit -m "Updated docs from ref: $GITHUB_SHA"
git push