mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 17:07:04 +02:00
docs: Add initial docs
This commit is contained in:
parent
155946fb1e
commit
567577762f
15 changed files with 819 additions and 11 deletions
65
.github/workflows/docs-release.yaml
vendored
Normal file
65
.github/workflows/docs-release.yaml
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue