Change update doc action (5) #85
This file contains hidden or 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: 📝 Update documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'msa_sdk/*' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} | |
| jobs: | |
| pull-request: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - name: Install dependencies | |
| run: | | |
| DIR=$(pwd) | |
| cd ../ | |
| python -m pip install --upgrade pip | |
| if [ -f ${DIR}/requirements.txt ]; then pip install -r ${DIR}/requirements.txt ; fi | |
| if [ -f ${DIR}/requirements-dev.txt ]; then pip install -r ${DIR}/requirements-dev.txt ; fi | |
| - name: Generate doc | |
| run: | | |
| pdoc --html --force -o msa_sdk_doc msa_sdk | |
| cp msa_sdk.json msa_sdk_doc/msa_sdk | |
| - name: Create pull request | |
| uses: gabrielpossamai/action-pull-request-another-repo@main | |
| env: | |
| API_TOKEN_GITHUB: ${{ env.MSA_DOCKER_REPO_ACCESS_TOKEN }} | |
| with: | |
| source_folder: 'msa_sdk_doc/msa_sdk/' | |
| destination_repo: 'ubiqube/msa-front' | |
| destination_folder: 'msa_sdk_doc' | |
| destination_base_branch: 'master' | |
| destination_head_branch: 'update_pythonsdk_doc' | |
| user_email: 'qa@ubiqube.com' | |
| user_name: 'qa4ubiqube' | |
| pr_title: 'Update Pyhton SDK documentation' | |
| commit_msg: 'Update documentation automatic created' |