mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
mkdocs: add github workflow
This commit is contained in:
36
.github/workflows/mkdocs-deploy.yaml
vendored
Normal file
36
.github/workflows/mkdocs-deploy.yaml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# This is a manually triggered workflow to build and publish the MkDocs from the
|
||||
# main branch to GitHub pages at https://aquasecurity.github.io/trivy
|
||||
name: Deploy documentation
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Version to be deployed
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy documentation
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
- uses: actions/setup-python@v2
|
||||
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_GH_TOKEN }}
|
||||
- run: |
|
||||
git config user.name "ronaudinho"
|
||||
git config user.email "doelaudi@gmail.com"
|
||||
- run: |
|
||||
mike deploy --push --update-aliases ${{ github.event.inputs.version }} latest
|
||||
Reference in New Issue
Block a user