update_docs #141
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
# This will attempt to retrieve and add/update documentation | |
name: update_docs | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 5 * * *" # Run everyday at 05:00 | |
env: | |
PIP_DISABLE_PIP_VERSION_CHECK: 1 | |
jobs: | |
# job prepare sets everything up | |
update-docs: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
# Most scripts will be run from the stubs repo, set that as default | |
defaults: | |
run: | |
shell: bash | |
working-directory: ${{github.workspace}} | |
# /micropython-stubs | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
###################################### | |
# Check out repo: | |
# josverl/micropython-stubs | |
###################################### | |
- name: Checkout stubs repo | |
uses: actions/checkout@v4 | |
# with: | |
# repository: josverl/micropython-stubs | |
# path: micropython-stubs | |
# make Python work | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
# with: | |
# python-version: 3.9 | |
# cache: "pip" | |
- name: Install Python dependencies (doc only) | |
working-directory: ${{github.workspace}} | |
run: | | |
pip install --upgrade wheel | |
pip install -r docs/requirements.txt | |
###################################### | |
# This is where the actual work starts | |
###################################### | |
- name: Update Documentation | |
working-directory: ${{github.workspace}}/docs | |
run: | | |
python update_docs.py | |
- name: commit | |
uses: ./.github/actions/commit | |
with: | |
message: "Update stubs documentation" |