forked from aquasecurity/tracee
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.37 KB
/
mkdocs-latest.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
44
---
name: Deploy the latest documentation
on:
push:
# Include tags whose name match release pattern "v*", like v0.7.0 (refs/tags/v0.7.0)
# Exclude tags whose name match release candidate pattern "v*-rc*", like v0.7.0-rc-1 (refs/tags/v0.7.0-rc-1)
tags:
- "v*"
- "!v*-rc*"
workflow_dispatch:
inputs:
tag:
required: false
jobs:
deploy:
name: Deploy the latest documentation
runs-on: ubuntu-20.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
- name: Install dependencies
run: |
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
pip install mike
pip install mkdocs-macros-plugin
env:
GH_TOKEN: ${{ secrets.MKDOCS_AQUA_BOT }}
- name: Setup Git
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
- name: Deploy the latest documents
run: |
VERSION="${{ github.event.inputs.tag }}"
if [ -z $VERSION ]; then
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
fi
mike deploy --push --update-aliases $VERSION latest