Skip to content
Snippets Groups Projects
Unverified Commit 53752487 authored by Yoav Rotem's avatar Yoav Rotem Committed by GitHub
Browse files

Add git config user (#901)

* Add git config user

* Create mkdocs-deploy.yaml

* Delete mkdocs-latest.yaml

* Delete mkdocs-dev.yaml
parent 75fe5d00
No related branches found
No related tags found
No related merge requests found
---
name: Deploy the dev documentation
# 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:
push:
paths:
- 'docs/**'
- mkdocs.yml
branches:
- main
workflow_dispatch:
inputs:
version:
description: Version to be deployed
required: true
jobs:
deploy:
name: Deploy the dev documentation
name: Deploy documentation
runs-on: ubuntu-18.04
steps:
- name: Checkout main
......@@ -20,16 +22,15 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
- 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 }}
- name: Setup Git
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
- name: Deploy the dev documents
run: mike deploy --push dev
- 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
---
name: Deploy the latest documentation
on:
push:
tags:
- "v*"
jobs:
deploy:
name: Deploy the latest 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
- 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.ORG_GITHUB_TOKEN }}
- name: Deploy the latest documents
run: |
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
mike deploy --push --update-aliases $VERSION latest
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment