Build launcher documentation, deploy it on branch gh-pages #9
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
# ************************************************************************* | |
# ** Copyright (c) 2024 CentraleSupélec & EDF. | |
# ** All rights reserved. This program and the accompanying materials | |
# ** are made available under the terms of the Eclipse Public License v2.0 | |
# ** which accompanies this distribution, and is available at | |
# ** https://www.eclipse.org/legal/epl-v20.html | |
# ** | |
# ** This file is part of the RiseClipse tool | |
# ** | |
# ** Contributors: | |
# ** Computer Science Department, CentraleSupélec | |
# ** EDF R&D | |
# ** Contacts: | |
# ** [email protected] | |
# ** [email protected] | |
# ** Web site: | |
# ** https://riseclipse.github.io | |
# ************************************************************************* | |
name: Build launcher documentation, deploy it on riseclipse.github.io | |
on: workflow_dispatch | |
jobs: | |
build-python-launcher-docs: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout ${{ github.event.repository.name }} | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ github.event.repository.name }} | |
- name: Checkout riseclipse-temporary | |
uses: actions/checkout@v4 | |
with: | |
repository: riseclipse/riseclipse-temporary | |
path: riseclipse-temporary | |
ref: master | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
pip install sphinx sphinx_rtd_theme pandas | |
- name: Sphinx build | |
run: | | |
cd ${{ github.event.repository.name }}/fr.centralesupelec.edf.riseclipse.python.launcher/docs | |
make html | |
- name: Copy on riseclipse.github.io | |
run: | | |
cp -r ${{ github.event.repository.name }}/fr.centralesupelec.edf.riseclipse.python.launcher/docs/_build/html riseclipse-temporary/python-launcher-docs/ | |
- name: Configure Git User | |
run: | | |
git config --global user.email [email protected] | |
git config --global user.name "GitHub Actions" | |
- name: Create and switch to branch new_documentation | |
run: | | |
cd riseclipse-temporary | |
git branch new_documentation | |
git switch new_documentation | |
git push --set-upstream origin new_documentation | |
- name: Commit new documentation | |
run: | | |
cd riseclipse-temporary | |
git add --all | |
git commit -m "New version of documentation of python-launcher" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
base: master | |
branch: new_documentation | |
labels: automated pr | |
title: '[action] New documentation built' | |
path: riseclipse-temporary | |