Skip to content

Update documentation #23

Update documentation

Update documentation #23

Workflow file for this run

name: Update documentation
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'manual'
type: choice
options:
- manual
- info
- warning
- debug
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.11.7'
- uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Set up the environment
uses: ./.github/actions/setup-env
- name: Install doc dependencies
run: |
uv sync --group docs
- name: List directories
run: |
ls -la
- name: Build Documentation
run: |
uv run mkdocs build -f docs/mkdocs.yml -d _build
- name: Add files
run: |
echo "nebula.enriquetomasmb.com" > docs/_build/CNAME
- name: List directories
run: |
ls -la docs/_build/
- uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: List directories
run: |
ls -la gh-pages/
- name: Copy documentation to the gh-pages branch
run: |
cp -r docs/_build/* gh-pages/
touch gh-pages/.nojekyll
- name: List directories
run: |
ls -la gh-pages/
- name: Commit and Push changes
run: |
cd gh-pages
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Update documentation" -a || echo "No changes to commit"
git push origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}