forked from aquasecurity/trivy-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.41 KB
/
publish-docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
# This is a manually triggered workflow to build and publish the MkDocs from the
# specified Git revision to GitHub pages on https://aquasecurity.github.io/trivy-operator.
name: Publish documentation
on:
workflow_dispatch:
inputs:
ref:
description: The branch, tag or SHA to deploy, e.g. v0.0.1
required: true
# Disable permissions granted to the GITHUB_TOKEN for all the available scopes.
permissions: {}
jobs:
deploy:
name: Deploy documentation
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout main
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
with:
ref: ${{ github.event.inputs.ref }}
fetch-depth: 0
persist-credentials: true
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
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 "[email protected]"
- run: |
mike deploy --push --update-aliases ${{ github.event.inputs.ref }} latest