Skip to content

Commit

Permalink
feat(docs): Add github action to build docs (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
simar7 authored May 6, 2022
1 parent 7eddc5d commit b8d5480
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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/postee
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-20.04
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@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
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

0 comments on commit b8d5480

Please sign in to comment.