Deploy MkDocs #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy MkDocs | |
on: | |
workflow_dispatch: | |
inputs: | |
deploy_message: | |
description: 'Deployment message' | |
required: false | |
default: 'Manual documentation update' | |
type: string | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install mkdocs-material | |
pip install mkdocs | |
- name: Configure Git user | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Create CNAME file | |
working-directory: ./mkdocs/docs | |
run: echo "goiabada.dev" > CNAME | |
- name: Deploy documentation | |
working-directory: ./mkdocs | |
run: mkdocs gh-deploy --force --message "${{ github.event.inputs.deploy_message }}" |