Update main.yml #37
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: ammaraskar/sphinx-action@master | |
with: | |
docs-folder: "micropython/docs/" | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: html | |
path: micropython/docs/build/html/ | |
- name: Commit documentation changes | |
run: | | |
git clone https://github.com/openmv/openmv-doc.git | |
cp -r micropython/docs/build/html/* docs/ | |
cd docs | |
touch .nojekyll | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update documentation" -a || true | |
# The above command will fail if no changes were present, so we ignore that. | |
- name: Push documentation changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: master | |
directory: docs | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Pushes to another repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | |
with: | |
source-directory: 'micropython/docs/build/html' | |
destination-github-username: 'openmv' | |
destination-repository-name: 'qt-creator' | |
target-branch: openmv-new | |
target-directory: 'share/qtcreator/html' |