2021-08-03 14:10:50 +00:00
|
|
|
---
|
2021-06-14 09:13:48 +00:00
|
|
|
# This is a manually triggered workflow to build and publish the MkDocs from the
|
|
|
|
# main branch to GitHub pages at https://aquasecurity.github.io/kube-bench.
|
|
|
|
name: Deploy documentation
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: Version to be deployed
|
|
|
|
required: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
name: Deploy documentation
|
2023-04-05 10:02:36 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-06-14 09:13:48 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout main
|
2022-03-08 09:22:17 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-06-14 09:13:48 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
persist-credentials: true
|
2022-06-17 15:42:00 +00:00
|
|
|
- uses: actions/setup-python@v4
|
2021-06-14 09:13:48 +00:00
|
|
|
with:
|
|
|
|
python-version: 3.x
|
|
|
|
- run: |
|
|
|
|
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
|
|
|
pip install mike
|
|
|
|
pip install mkdocs-macros-plugin
|
|
|
|
env:
|
|
|
|
# Note: It is not the same as ${{ secrets.GITHUB_TOKEN }} !
|
|
|
|
GH_TOKEN: ${{ secrets.MKDOCS_AQUA_BOT }}
|
|
|
|
- run: |
|
|
|
|
git config user.name "aqua-bot"
|
|
|
|
git config user.email "aqua-bot@users.noreply.github.com"
|
|
|
|
- run: |
|
|
|
|
mike deploy --push --update-aliases ${{ github.event.inputs.version }} latest
|