-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (44 loc) · 1.35 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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