Skip to content

Workflow file for this run

name: Publish MkDocs Documentation
permissions:
contents: write
on:
push:
branches:
- main # Déclenche l'action uniquement sur la branche principale
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Vérifier le dépôt
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.HYLE_GH_APP_ID }}
private-key: ${{ secrets.HYLE_GH_APP_SECRET }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
# Configurer Python
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
# Installer les dépendances
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs-awesome-pages-plugin
pip install mkdocs mkdocs-material
pip install mkdocs-video
pip install "mkdocs-material[imaging]"
pip install neoteroi-mkdocs
- name: Setup git user
run: |
git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
git fetch origin gh-pages
- name: Publish doc
run: |
mkdocs gh-deploy